diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-10-09 01:47:43 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-10-09 01:47:43 -0600 |
commit | 9832f887e1772e1c0f546371584be323ae440fb8 (patch) | |
tree | b17ab95110ca45c673594db21ee2f73042163d1c /test/integrations/anonymous_parsed/test.sh | |
parent | bc404348ec9012eb08e08e29e8caf80dda73247f (diff) | |
download | fiddle-9832f887e1772e1c0f546371584be323ae440fb8.tar.gz fiddle-9832f887e1772e1c0f546371584be323ae440fb8.tar.bz2 fiddle-9832f887e1772e1c0f546371584be323ae440fb8.zip |
Add system to spec for running integration shell scirpts.
The spec will recursively go through the test directories and look for
`test.sh` files. If it finds one, it will run it. If the script returns
0, then the test passes, otherwise the test fails.
Diffstat (limited to 'test/integrations/anonymous_parsed/test.sh')
-rwxr-xr-x | test/integrations/anonymous_parsed/test.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/integrations/anonymous_parsed/test.sh b/test/integrations/anonymous_parsed/test.sh new file mode 100755 index 0000000..9bcb6a6 --- /dev/null +++ b/test/integrations/anonymous_parsed/test.sh @@ -0,0 +1,17 @@ +#!/bin/bash +source "$(git rev-parse --show-toplevel)/test/integrations/common.sh" + +output=$( + stack run -- --dump-parsed input.fdl | + jq '.. + | objects + | select(._con == "RegisterBitsAnonymousType") + | .anonBitsType + .anonEnumBody[0] + .enumConsts[0] + .directedSubtree + .enumConstIdent') + +assert_eq "$output" '"on"' + +finish |