Files
Zachary Snow 0fb3a41ed3 additional test coverage
- test deprecated flags
- test struct const edge cases
- test implicit net edge cases
- test dump-prefix
2023-05-14 00:54:22 -04:00

28 lines
587 B
Bash
Executable File

#!/bin/bash
PHASES=(
parse
initial
main_1
main_2
final
)
test_dump_prefix() {
runAndCapture --dump-prefix=dump_ example.sv
assertTrue "default conversion should succeed" $result
assertNotNull "stdout should not be empty" "$stdout"
assertNull "stderr should be empty" "$stderr"
assertTrue "main_3 dump should not exist" "[ ! -f dump_main_3.sv ]"
for phase in "${PHASES[@]}"; do
path=dump_$phase.sv
assertTrue "$phase dump should be non-empty" "[ -s $path ]"
rm $path
done
}
source ../lib/functions.sh
. shunit2