blob: 8c99510a0a9daf9744235e777b1a608d6d7c2c13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
discard """
joinable: false
"""
const expected = """
FAIL: tests/shouldfail/tccodecheck.nim
Failure: reCodegenFailure
Expected:
baz
FAIL: tests/shouldfail/tcolumn.nim
Failure: reLinesDiffer
FAIL: tests/shouldfail/terrormsg.nim
Failure: reMsgsDiffer
FAIL: tests/shouldfail/texitcode1.nim
Failure: reExitcodesDiffer
FAIL: tests/shouldfail/tfile.nim
Failure: reFilesDiffer
FAIL: tests/shouldfail/tline.nim
Failure: reLinesDiffer
FAIL: tests/shouldfail/tmaxcodesize.nim
Failure: reCodegenFailure
max allowed size: 1
FAIL: tests/shouldfail/tnimout.nim
Failure: reMsgsDiffer
FAIL: tests/shouldfail/tnimoutfull.nim
Failure: reMsgsDiffer
FAIL: tests/shouldfail/toutput.nim
Failure: reOutputsDiffer
FAIL: tests/shouldfail/toutputsub.nim
Failure: reOutputsDiffer
FAIL: tests/shouldfail/treject.nim
Failure: reFilesDiffer
FAIL: tests/shouldfail/tsortoutput.nim
Failure: reOutputsDiffer
FAIL: tests/shouldfail/ttimeout.nim
Failure: reTimeout
FAIL: tests/shouldfail/tvalgrind.nim
Failure: reExitcodesDiffer
"""
import std/[os,strformat,osproc]
import stdtest/testutils
proc main =
const nim = getCurrentCompilerExe()
let testamentExe = "bin/testament"
let cmd = fmt"{testamentExe} --directory:testament --colors:off --backendLogging:off --nim:{nim} category shouldfail"
let (outp, status) = execCmdEx(cmd)
doAssert status == 1, $status
let ok = greedyOrderedSubsetLines(expected, outp, allowPrefixMatch = true)
doAssert ok, &"\nexpected:\n{expected}\noutp:\n{outp}"
main()
|