tshould_not_work.nim 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/tnotenoughretries.nim
  27. Failure: reExitcodesDiffer
  28. FAIL: tests/shouldfail/toutput.nim
  29. Failure: reOutputsDiffer
  30. FAIL: tests/shouldfail/toutputsub.nim
  31. Failure: reOutputsDiffer
  32. FAIL: tests/shouldfail/treject.nim
  33. Failure: reFilesDiffer
  34. FAIL: tests/shouldfail/tsortoutput.nim
  35. Failure: reOutputsDiffer
  36. FAIL: tests/shouldfail/ttimeout.nim
  37. Failure: reTimeout
  38. FAIL: tests/shouldfail/tvalgrind.nim
  39. Failure: reExitcodesDiffer
  40. """
  41. import std/[os,strformat,osproc]
  42. import stdtest/testutils
  43. proc main =
  44. const nim = getCurrentCompilerExe()
  45. let testamentExe = "testament/testament"
  46. let cmd = fmt"{testamentExe} --directory:testament --colors:off --backendLogging:off --nim:{nim} category shouldfail"
  47. let (outp, status) = execCmdEx(cmd)
  48. doAssert status == 1, $status
  49. let ok = greedyOrderedSubsetLines(expected, outp, allowPrefixMatch = true)
  50. doAssert ok, &"\nexpected:\n{expected}\noutp:\n{outp}"
  51. main()