tshould_not_work.nim 1.4 KB

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