Version 0.3.0: testall.cmds mit einem Beispiel pro Befehl
This commit is contained in:
@@ -445,6 +445,13 @@ class HelpTest < RdbCase
|
||||
assert_equal "\e[3;8H", rdb('cursor', '3', '8')
|
||||
end
|
||||
|
||||
def test_testall_mentions_every_command
|
||||
script = File.read(File.join(DEMO, 'testall.cmds'))
|
||||
names = data(rdb('commands')).map(&:first)
|
||||
missing = names.reject { |n| script.match?(/(^|[\s|;(])#{Regexp.escape(n)}(\s|$)/) }
|
||||
assert_empty missing, "testall.cmds lacks an example for: #{missing.join(' ')}"
|
||||
end
|
||||
|
||||
def test_testall_runs_demo_script
|
||||
out = rdb('testall')
|
||||
assert_includes out, '$ row'
|
||||
|
||||
Reference in New Issue
Block a user