298 <testcase name="test-failure-unicode.t"/> |
298 <testcase name="test-failure-unicode.t"/> |
299 <testcase name="test-failure.t"/> |
299 <testcase name="test-failure.t"/> |
300 <testcase name="test-success.t"/> |
300 <testcase name="test-success.t"/> |
301 </testsuite> |
301 </testsuite> |
302 |
302 |
303 $ rt --list-tests test-failure* --json --xunit=xunit.xml |
303 $ rt --list-tests test-failure* --json --xunit=xunit.xml --outputdir output |
304 test-failure-unicode.t |
304 test-failure-unicode.t |
305 test-failure.t |
305 test-failure.t |
306 $ cat report.json |
306 $ cat output/report.json |
307 testreport ={ |
307 testreport ={ |
308 "test-failure-unicode.t": { |
308 "test-failure-unicode.t": { |
309 "result": "success" |
309 "result": "success" |
310 }, |
310 }, |
311 "test-failure.t": { |
311 "test-failure.t": { |
834 "result": "success", ? (re) |
834 "result": "success", ? (re) |
835 "start": "\s*[\d\.]{4,5}", ? (re) |
835 "start": "\s*[\d\.]{4,5}", ? (re) |
836 "time": "\s*[\d\.]{4,5}" (re) |
836 "time": "\s*[\d\.]{4,5}" (re) |
837 } |
837 } |
838 } (no-eol) |
838 } (no-eol) |
|
839 --json with --outputdir |
|
840 |
|
841 $ rm report.json |
|
842 $ rm -r output |
|
843 $ mkdir output |
|
844 $ rt --json --outputdir output |
|
845 |
|
846 --- $TESTTMP/test-failure.t |
|
847 +++ $TESTTMP/output/test-failure.t.err |
|
848 @@ -1,5 +1,5 @@ |
|
849 $ echo babar |
|
850 - rataxes |
|
851 + babar |
|
852 This is a noop statement so that |
|
853 this test is still more bytes than success. |
|
854 pad pad pad pad............................................................ |
|
855 |
|
856 ERROR: test-failure.t output changed |
|
857 !.s |
|
858 Skipped test-skip.t: missing feature: nail clipper |
|
859 Failed test-failure.t: output changed |
|
860 # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
861 python hash seed: * (glob) |
|
862 [1] |
|
863 $ f report.json |
|
864 report.json: file not found |
|
865 $ cat output/report.json |
|
866 testreport ={ |
|
867 "test-failure.t": [\{] (re) |
|
868 "csys": "\s*[\d\.]{4,5}", ? (re) |
|
869 "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
870 "diff": "---.+\+\+\+.+", ? (re) |
|
871 "end": "\s*[\d\.]{4,5}", ? (re) |
|
872 "result": "failure", ? (re) |
|
873 "start": "\s*[\d\.]{4,5}", ? (re) |
|
874 "time": "\s*[\d\.]{4,5}" (re) |
|
875 }, ? (re) |
|
876 "test-skip.t": { |
|
877 "csys": "\s*[\d\.]{4,5}", ? (re) |
|
878 "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
879 "diff": "", ? (re) |
|
880 "end": "\s*[\d\.]{4,5}", ? (re) |
|
881 "result": "skip", ? (re) |
|
882 "start": "\s*[\d\.]{4,5}", ? (re) |
|
883 "time": "\s*[\d\.]{4,5}" (re) |
|
884 }, ? (re) |
|
885 "test-success.t": [\{] (re) |
|
886 "csys": "\s*[\d\.]{4,5}", ? (re) |
|
887 "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
888 "diff": "", ? (re) |
|
889 "end": "\s*[\d\.]{4,5}", ? (re) |
|
890 "result": "success", ? (re) |
|
891 "start": "\s*[\d\.]{4,5}", ? (re) |
|
892 "time": "\s*[\d\.]{4,5}" (re) |
|
893 } |
|
894 } (no-eol) |
|
895 $ ls -a output |
|
896 . |
|
897 .. |
|
898 .testtimes |
|
899 report.json |
|
900 test-failure.t.err |
839 |
901 |
840 Test that failed test accepted through interactive are properly reported: |
902 Test that failed test accepted through interactive are properly reported: |
841 |
903 |
842 $ cp test-failure.t backup |
904 $ cp test-failure.t backup |
843 $ echo y | rt --json -i |
905 $ echo y | rt --json -i |