--- Test the basic features of Strategy and Suite (base.yml): !S::Suite contents: - pass: !S::Pass {} - fail: !S::Fail weight: -1 - error: !S::Error weight: -1 - stub: !S::Stub returned_value: foo: bar toto: tata - abort: !S::Abort weight: -1 - pass output: !S::RMatch test: !S::Pass {} match: [//status/PASS] - fail output: !S::RMatch test: !S::Fail {} match: [//status/FAIL] - error output: !S::RMatch test: !S::Error {} match: [//status/ERROR] - stub output: !S::RMatch test: !S::Stub returned_value: foo: bar toto: tata match: - //foo/bar - //toto/tata - abort output: !S::RMatch test: !S::Abort {} match: [//status/ABORT] - timeout sleep output: !S::RMatch test: !S::Sleep delay: 0.5 timeout: 0.2 match: - //status/ABORT - //reason/abort 'test' with timeout 0.2s - timeout_suite: !S::Suite timeout: 0.3 weight: -1 attributes: !S::Sleep delay: 0.1 contents: - a - b - c - d - cmd: !S::Cmd command: 'true' exit: 0 - bad cmd: !S::Cmd weight: -1 command: /bin/unexisting_command exit: 0 - abort cmd: !S::Suite contents: - cmd: !S::Cmd weight: -1 timeout: 0.1 command: sleep args: 1 - check for zombies: !S::KillAll regexp: !re sleep - abort suite cmd: !S::Suite contents: - suite: !S::Suite weight: -1 timeout: 0.1 contents: - cmd: !S::Cmd command: sleep args: 1 - check for zombies: !S::KillAll regexp: !re sleep - command: !S::Command command: 'true' exit: 0 - bad command: !S::Command command: /bin/unexisting_command exit: 127 - abort command: !S::Suite contents: - match: !S::RMatch test: !S::Command timeout: 0.3 command: sleep args: 1 match: - //reason/abort 'test' with timeout 0.3s - //status/ABORT - check for zombies: !S::KillAll regexp: !re sleep - abort suite command: !S::Suite contents: - suite: !S::Suite weight: -1 timeout: 0.1 contents: - command: !S::Command command: sleep args: 1 - check for zombies: !S::KillAll regexp: !re sleep - timeout suite of suite: !S::Suite weight: -1 timeout: 0.01 contents: - suite: !S::Suite contents: - pass: !S::Sleep delay: 0.1 - true pre assertion and pass: !S::Pass pre_assertion: true - true pre assertion and fail: !S::Fail pre_assertion: true weight: -1 - false pre assertion and pass: !S::Pass pre_assertion: false weight: -1 - exception pre assertion and pass: !S::Pass pre_assertion: raise 'ASSERT' weight: -1 - true post assertion and pass: !S::Pass post_assertion: true - true post assertion and fail: !S::Fail post_assertion: true weight: -1 - false post assertion and pass: !S::Pass post_assertion: false weight: -1 - exception post assertion and pass: !S::Pass post_assertion: raise 'ASSERT' weight: -1 - Test the path substitution: !S::Suite symbols: test_path: !path <> results: [ !path a, !path b ] contents: - Iterate over an array: !S::Iterate over: [a, b] iter: test_path_it test: Test <>: !S::Assert test: | my = @symtbl[:test_path].do_symtbl_gsub(@symtbl) ref = @symtbl[:results].shift assert_equal(ref, my)