diff options
| author | 2021-01-18 17:23:32 +0100 | |
|---|---|---|
| committer | 2021-01-18 17:23:32 +0100 | |
| commit | 56d9cef5a07ba1a7fb35a3f0775a1c2fe0991ffe (patch) | |
| tree | 86c964e00105d7f52b53f011c5cfe7466bd9e132 /test | |
| parent | Make tests uroborical (diff) | |
Add suppress-stdout test
Diffstat (limited to 'test')
| -rw-r--r-- | test/suite7.janet | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/suite7.janet b/test/suite7.janet index a91efb4..3909a30 100644 --- a/test/suite7.janet +++ b/test/suite7.janet @@ -35,12 +35,20 @@ (test/assert (truthy? m) "timeit2 -- invalid output") (test/assert (scan-number (in m 0)) "timeit2 -- invalid number of seconds")) +# test/capture-stdout (test/assert - (= [nil "\nRunning test suite 666 tests...\n\n\e[32m\xE2\x9C\x94\e[0m\n\nTest suite 666 finished in 0.000 soconds\n12 of 12 tests passed.\n\n"]) + (= [nil "\nRunning test suite 666 tests...\n\n\e[32m\xE2\x9C\x94\e[0m\n\nTest suite 666 finished in 0.000 soconds\n13 of 13 tests passed.\n\n"]) (test/capture-stdout (do (test/start-suite 666) (test/assert true "true") (test/end-suite)))) +# test/suppress-stdout +(test/assert + (= [nil ""] + (test/capture-stdout + (test/suppress-stdout (print "Hello world!")))) + "suppress-stdout") + (test/end-suite) |
