Module:BDD/localize/en

From Omniversalis

Documentation for this module may be created at Module:BDD/localize/en/doc

-- localization for Behavior Driven Development testing framework
-- © John Erling Blad, Creative Commons by Attribution 3.0

local msgs = {
	["@metadata"] = {
		["authors"] = {
			"John Erling Blad < jeblad@gmail.com >",
		}
	},
	-- all headeres
	['result'] = 'Result $1',
	['pending'] = 'Pending $1',
	['describe'] = 'Describe $1',
	['context'] = 'Context $1',
	['it'] = 'It $1',
	-- all muted headers
	['xdescribe'] = 'Mute "describe" $1',
	['xcontext'] = 'Mute "context" $1',
	['xit'] = 'Mute "it" $1',
	-- exceptions
	['exception'] = 'Catch $1',
	['exception-noargs'] = 'Catch (no message)',
	-- stack traces
	['stack'] = 'Stack',
	-- spies
	['carp'] = 'Carp',
	['cluck'] = 'Cluck',
	['croak'] = 'Croak',
	['spy'] = 'Spy $1',
	['spy-args'] = 'Spy $1',
	['spy-no-formatter'] = 'Spy $1',
	-- actual values
	['actual'] = 'actual ($1)',
	--['actual-noargs'] = 'actual is empty',
	['actual-noargs'] = '',
	-- anticipated values
	['anticipated'] = 'and anticipate ($1),',
	--['anticipated-noargs'] = 'and anticipate is empty',
	['anticipated-noargs'] = '',
	-- expect is an outher wrapper for actual values
	['expect'] = 'Expect $1',
	['expect-args'] = 'Expect $1',
	['expect-no-formatter'] = 'Expect $1',
	-- reformatted actual values
	['as-upper'] = 'change to uppercase',
	['as-lower'] = 'change to lowercase',
	['as-upper-first'] = 'change first letter to uppercase',
	['as-lower-first'] = 'change first letter to lowercase',
	['as-identity'] = 'use as identity',
	-- delayed processing of the result
	['when-invert'] = 'and then invert the result',
	['when-identity'] = 'and then use the result',
	-- the type of test to be done, ie. how to create the initial result
	['if-boolean'] = 'Check if actual is "boolean" type,',
	['if-string'] = 'Check if actual is "string" type',
	['if-number'] = 'Check if actual is "number" type',
	['if-table'] = 'Check if actual is "table" type',
	['if-nil'] = 'Check if actual is "nil" type,',
	['if-fail'] = 'Force fail,', --change
	['if-equal'] = 'Check if actual is "equal" anticipated value,',
	['if-deep-equal'] = 'Check if actual is "deep equal" anticipated value,',
	['if-lesser-than'] = 'Check if actual is "lesser than" anticipated value,',
	['if-greater-than'] = 'Check if actual is "greather than" anticipated value,',
	['if-lesser-or-equal'] = 'Check if actual is "lesser or equal" anticipated value,',
	['if-greater-or-equal'] = 'Check if actual is "greater or equal" anticipated value,',
	['if-false'] = 'Check if actual is "false",',
	['if-true'] = 'Check if actual is "true",',
	['if-falsy'] = 'Check if actual is "falsy",',
	['if-truthy'] = 'Check if actual is "truthy",',
	['if-first-identity'] = 'Actual identity is $1,',
	['if-second-identity'] = 'Anticipated identity is $1,',
	['if-match'] = 'Check if actual contains anticipated string,',
	['if-match-noargs'] = 'Check if actual contains nothing,',
	['if-ustring-match'] = 'Check if actual contains anticipated string,',
	['if-ustring-match-noargs'] = 'Check if actual contains nothing,',
	['if-contains'] = 'Check if actual contains anticipated value,',
	['if-close-to'] = 'Check if actual is close to anticipated value,',
	-- various
	['joiner'] = ', ', --not in use
	['no-formatter'] = "[no-formatter: $1]",
	['skipped'] = "[skipped]",
	-- categories for tracking of tested modules
	['category-all-tests'] = "All tests",
	['category-failed-tests'] = "Failed tests",
	['category-good-tests'] = "Good tests",
}

-- similar messages, most of them are triggered implicitly
msgs['to-be-boolean'] = msgs['if-boolean']
msgs['to-be-string'] = msgs['if-string']
msgs['to-be-number'] = msgs['if-number']
msgs['to-be-table'] = msgs['if-table']
msgs['to-be-nil'] = msgs['if-nil']
msgs['to-be-failing'] = msgs['if-failing']
msgs['to-be'] = msgs['if-equal']
msgs['to-be-equal'] = msgs['if-equal']
msgs['to-be-deep-equal'] = msgs['if-deep-equal']
msgs['to-be-lesser-than'] = msgs['if-lesser-than']
msgs['to-be-greater-than'] = msgs['if-greater-than']
msgs['to-be-lesser-or-equal'] = msgs['if-lesser-or-equal']
msgs['to-be-greater-or-equal'] = msgs['if-greater-or-equal']
msgs['to-be-falsy'] = msgs['if-falsy']
msgs['to-be-truthy'] = msgs['if-truthy']
msgs['to-be-false'] = msgs['if-false']
msgs['to-be-true'] = msgs['if-true']
	--['to-be-first-identity'] = 'first identity to be "$1"'
	--['to-be-second-identity'] = 'second identity to be "$1"'
msgs['to-be-match'] = msgs['if-match']
msgs['to-be-match-noargs'] = msgs['if-match-noargs']
msgs['to-be-ustring-match'] = msgs['if-ustring-match']
msgs['to-be-ustring-match-noargs'] = msgs['if-ustring-match-noargs']
msgs['to-be-contains'] = msgs['if-contains']
msgs['to-be-close-to'] = msgs['if-close-to']

return msgs