Commit e62a620e e62a620e82b187154ff78327a46e099f9061c851 by Nicolas Perriault

added clitest for a complete suite

1 parent c190a0d7
...@@ -121,5 +121,33 @@ class CasperExecTest(unittest.TestCase): ...@@ -121,5 +121,33 @@ class CasperExecTest(unittest.TestCase):
121 '1 failed.', 121 '1 failed.',
122 ], failing=True) 122 ], failing=True)
123 123
124 @timeout(60)
125 def test_full_suite(self):
126 folder_path = os.path.join(TEST_ROOT, 'tester')
127 failing_script = os.path.join(folder_path, 'failing.js')
128 passsing_script = os.path.join(folder_path, 'passing.js')
129 mytest_script = os.path.join(folder_path, 'mytest.js')
130 self.assertCommandOutputContains('test ' + folder_path, [
131 'Test file: %s' % failing_script,
132 '# true',
133 'FAIL Subject is strictly true',
134 '# type: assert',
135 '# file: %s:3' % failing_script,
136 '# code: test.assert(false);',
137 '# subject: false',
138 'Test file: %s' % mytest_script,
139 'PASS ok1',
140 'PASS ok2',
141 'PASS ok3',
142 'Test file: %s' % passsing_script,
143 '# true',
144 'PASS Subject is strictly true',
145 'FAIL 5 tests executed',
146 '4 passed',
147 '1 failed',
148 'Details for the 1 failed test:',
149 'assert: Subject is strictly true',
150 ], failing=True)
151
124 if __name__ == '__main__': 152 if __name__ == '__main__':
125 unittest.main() 153 unittest.main()
......