FlowControl.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * Flow Control tests.
  3. *
  4. * @author tlwr [toby@toby.codes]
  5. *
  6. * @copyright Crown Copyright 2017
  7. * @license Apache-2.0
  8. */
  9. TestRegister.addTests([
  10. {
  11. name: "Fork: nothing",
  12. input: "",
  13. expectedOutput: "",
  14. recipeConfig: [
  15. {
  16. op: "Fork",
  17. args: ["\n", "\n", false],
  18. },
  19. ],
  20. },
  21. {
  22. name: "Fork, Merge: nothing",
  23. input: "",
  24. expectedOutput: "",
  25. recipeConfig: [
  26. {
  27. op: "Fork",
  28. args: ["\n", "\n", false],
  29. },
  30. {
  31. op: "Merge",
  32. args: [],
  33. },
  34. ],
  35. },
  36. {
  37. name: "Fork, (expect) Error, Merge",
  38. input: "1\n2\na\n4",
  39. expectedError: true,
  40. recipeConfig: [
  41. {
  42. op: "Fork",
  43. args: ["\n", "\n", false],
  44. },
  45. {
  46. op: "To Base",
  47. args: [16],
  48. },
  49. {
  50. op: "Merge",
  51. args: [],
  52. },
  53. ],
  54. },
  55. ]);