Add bad exists interpreter error fixtures
This commit is contained in:
@@ -211,6 +211,13 @@ check_exitcode linuxcnc_interp_minimal_harness.subs_follow_main.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.fractional_linenumbers.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.namedparam_bug424.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.flowsnake.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_1.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_2.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_3.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_4.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_5.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_6.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_7.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_nested.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_no_feed_rate.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.bad_no_ijr.run
|
||||
@@ -1151,6 +1158,29 @@ grep -Fq "setup.current_x=0.25" "$FLOWSNAKE_STDOUT"
|
||||
grep -Fq "setup.current_y=1" "$FLOWSNAKE_STDOUT"
|
||||
grep -Fq "setup.current_z=1" "$FLOWSNAKE_STDOUT"
|
||||
|
||||
check_bad_file_fixture() {
|
||||
local name="$1"
|
||||
local read_count="$2"
|
||||
local execute_count="$3"
|
||||
local error_text="$4"
|
||||
local stdout_file="$BUILD_DIR/linuxcnc_interp_minimal_harness.$name.run.stdout.log"
|
||||
|
||||
grep -Fq "file_open=0" "$stdout_file"
|
||||
grep -Fq "file_read_count=$read_count" "$stdout_file"
|
||||
grep -Fq "file_execute_count=$execute_count" "$stdout_file"
|
||||
grep -Fq "file_saw_error=1" "$stdout_file"
|
||||
grep -Fq "file_error_text=$error_text" "$stdout_file"
|
||||
grep -Fq "canon_event=ON_RESET" "$stdout_file"
|
||||
}
|
||||
|
||||
check_bad_file_fixture bad_exists_1 2 1 "Expected # reading parameter"
|
||||
check_bad_file_fixture bad_exists_2 2 1 "Expected ] reading bracketed parameter"
|
||||
check_bad_file_fixture bad_exists_3 3 2 "Parameter number out of range"
|
||||
check_bad_file_fixture bad_exists_4 2 1 "Unknown word starting with f"
|
||||
check_bad_file_fixture bad_exists_5 2 1 "Named parameter not terminated"
|
||||
check_bad_file_fixture bad_exists_6 2 1 "bad number format (conversion failed) parsing ''"
|
||||
check_bad_file_fixture bad_exists_7 2 1 "Expected ] reading bracketed parameter"
|
||||
|
||||
BAD_NESTED_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.bad_nested.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$BAD_NESTED_STDOUT"
|
||||
grep -Fq "file_read_count=6" "$BAD_NESTED_STDOUT"
|
||||
|
||||
Reference in New Issue
Block a user