---
# follows are scripts (within same directory) with their expected result
# pass - result on successful execution
# fail - result expected when exits with error

# array scripts
- script: "array/script-map.js"
  pass:
    - "Wesley"
    - "Tiny"
    - "George"

# cast scripts
- script: "cast/script-cast.js"
  pass: "0.125"

# error scripts
- script: "error/script-catch-at-head.js"
  fail: 'unexpected "error.catch" at head of the chain'
- script: "error/script-catch-one.js"
  pass: "error=throw"
- script: "error/script-catch-two.js"
  pass: "error=throw1"
- script: "error/script-catch-three.js"
  pass: "input1"
- script: "error/script-catch-four.js"
  pass: "catch"
- script: "error/script-catch-five.js"
  pass:
    - "catch1"
    - "catch2"
- script: "error/script-throw-error.js"
  fail: "as error"
- script: "error/script-throw-predicate.js"
  fail: "as predicate"
- script: "error/script-throw-string.js"
  fail: "as string"

# JSON scripts
- script: "json/script-stringify.js"
  pass: '{"george":{"type":"cat"}}'

# loop scripts
- script: "loop/script-elif-at-head.js"
  fail: 'unexpected "loop.elif" at head of the chain'
- script: "loop/script-elif-missing-if.js"
  fail: '"then" missing a parent "if"'
- script: "loop/script-else-at-head.js"
  fail: 'unexpected "loop.else" at head of the chain'
- script: "loop/script-else-missing-if.js"
  fail: 'expecting if-like statement but found "std.in"'
- script: "loop/script-then-at-head.js"
  fail: 'unexpected "loop.then" at head of the chain'
- script: "loop/script-if-elif-predicate-test-with-domain.js"
  input: 0
  pass: 10
- script: "loop/script-if-elif-predicate-test-with-domain.js"
  input: 10
  pass: 20
- script: "loop/script-if-elif-predicate-test-with-domain.js"
  input: 20
  pass: 30
- script: "loop/script-if-elif-predicate-test-with-domain.js"
  input: 50
  pass: 50
- script: "loop/script-if-elif-predicate-test-without-domain.js"
  input: 0
  pass: 10
- script: "loop/script-if-elif-predicate-test-without-domain.js"
  input: 10
  pass: 20
- script: "loop/script-if-elif-predicate-test-without-domain.js"
  input: 20
  pass: 30
- script: "loop/script-if-elif-predicate-test-without-domain.js"
  input: 50
  pass: 50

# math scripts
- script: "math/script-binary.js"
  pass:
    - "1! = 1"
    - "2! = 2"
    - "3! = 6"
    - "4! = 24"
- script: "math/script-binary-assert.js"
  pass: true

# isay scripts - scripts testing our "compiler"
- script: "isay/script-closure-test.js"
  pass:
    age: 4
    name: "George"
- script: "isay/script-embedded-chain.js"
  pass:
    - age: 5
      link1: "link1"
      link2: "link2"
      name: "George"
      species: "cat"
    - age: 12
      link1: "link1"
      link2: "link2"
      name: "Wesley"
      species: "dog"
    - age: 0.5
      link1: "link1"
      link2: "link2"
      name: "Tiny"
      species: "cat"
- script: "isay/script-embedded-predicate.js"
  pass:
    - age: 5
      inserted: "data"
      name: "George"
      species: "cat"
    - age: 12
      inserted: "data"
      name: "Wesley"
      species: "dog"
    - age: 0.5
      inserted: "data"
      name: "Tiny"
      species: "cat"
- script: "isay/script-embedded-predicate-deep.js"
  pass:
    - "range(1)=[0]"
    - "range(2)=[0,1]"
    - "range(3)=[0,1,2]"
    - "range(4)=[0,1,2,3]"
- script: "isay/script-function-cache.js"
  pass: [1, 2]
- script: "isay/script-function-predicate.js"
  pass:
    - age: 5
      inserted: data
      name: George
      species: cat
    - age: 12
      inserted: data
      name: Wesley
      species: dog
    - age: 0.5
      inserted: data
      name: Tiny
      species: cat
- script: "isay/script-unknown-action.js"
  fail: "json.invalid is not a function"

# object scripts
- script: "object/script-get.js"
  pass: "cat"
- script: "object/script-set.js"
  pass:
    george:
      type: cat
    helen:
      type: cat

# os scripts

# step scripts
- script: "step/script-elif-at-head.js"
  fail: 'unexpected "step.elif" at head of the chain'
- script: "step/script-elif-missing-if.js"
  fail: '"then" missing a parent "if"'
- script: "step/script-else-at-head.js"
  fail: 'unexpected "step.else" at head of the chain'
- script: "step/script-else-missing-if.js"
  fail: 'expecting if-like statement but found "std.in"'
- script: "step/script-else-sequence.js"
  pass: [0, 2, 4, 12, 16, 20]
- script: "step/script-if-elif-predicate-test-with-domain.js"
  input: 0
  pass: "first"
- script: "step/script-if-elif-predicate-test-with-domain.js"
  input: 10
  pass: "second"
- script: "step/script-if-elif-predicate-test-with-domain.js"
  input: 20
  pass: "third"
- script: "step/script-if-elif-predicate-test-with-domain.js"
  input: 30
  pass: "fourth"
- script: "step/script-if-elif-predicate-test-without-domain.js"
  input: 0
  pass: "first"
- script: "step/script-if-elif-predicate-test-without-domain.js"
  input: 10
  pass: "second"
- script: "step/script-if-elif-predicate-test-without-domain.js"
  input: 20
  pass: "third"
- script: "step/script-if-elif-predicate-test-without-domain.js"
  input: 30
  pass: "fourth"
- script: "step/script-if-literal-test-false-with-domain.js"
  pass: false
- script: "step/script-if-literal-test-true-with-domain.js"
  pass: true
- script: "step/script-if-literal-test-false-without-domain.js"
  pass: false
- script: "step/script-if-literal-test-true-without-domain.js"
  pass: true
- script: "step/script-if-predicate-test-with-domain.js"
  input: true
  pass: true
- script: "step/script-if-predicate-test-with-domain.js"
  input: false
  pass: false
- script: "step/script-if-predicate-test-without-domain.js"
  input: true
  pass: true
- script: "step/script-if-predicate-test-without-domain.js"
  input: false
  pass: false
- script: "step/script-then-at-head.js"
  fail: 'unexpected "step.then" at head of the chain'
