diff --git a/wasm-port/docs/linuxcnc-test-porting-tracker.md b/wasm-port/docs/linuxcnc-test-porting-tracker.md index 2f48fe0..b338081 100644 --- a/wasm-port/docs/linuxcnc-test-porting-tracker.md +++ b/wasm-port/docs/linuxcnc-test-porting-tracker.md @@ -81,7 +81,7 @@ wasm-port/tests/host/verify_host_smokes.sh | `tests/interp/fractional-linenumbers` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers`; validates LinuxCNC fractional line-number parsing through vendored file execution paths. | | `tests/interp/namedparam-bug424` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424`; validates LinuxCNC named-parameter parsing regression behavior through vendored file execution paths. | | `tests/interp/flowsnake` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/flowsnake`; validates LinuxCNC recursive O-word subroutine execution, expression evaluation, and comment argument handling through a pure file-execution fractal toolpath. | -| `tests/interp/bad` selected file errors | Done | Native, WASM Node, browser | Vendored selected upstream files under `wasm-port/vendor/linuxcnc/tests/interp/bad`; validates LinuxCNC file-execution error text for nested subroutine definitions, zero-feed G1, missing arc center/radius words, and probe motion without axes. | +| `tests/interp/bad` selected file errors | Done | Native, WASM Node, browser | Vendored selected upstream files under `wasm-port/vendor/linuxcnc/tests/interp/bad`; validates LinuxCNC file-execution error text for malformed `EXISTS[]` parameter expressions, nested subroutine definitions, zero-feed G1, missing arc center/radius words, and probe motion without axes. | | `tests/interp/g33.1` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g33.1`; validates LinuxCNC rigid-tap `G33.1` file execution, spindle start, feed synchronization, and `RIGID_TAP` canonical output through vendored interpreter paths. | | `tests/interp/rotation` selected pure interpreter cases | Done | Native, WASM Node, browser | Vendored selected upstream cases under `wasm-port/vendor/linuxcnc/tests/interp/rotation`; validates LinuxCNC machine-coordinate `G53` absolute-position named parameters `#<_abs_x>`, `#<_abs_y>`, and `#<_abs_z>` across G54 offsets, G92 offsets, XY rotation, and inch/millimeter modes, plus rotated-coordinate `G28` and `G53` endpoint behavior through vendored file execution paths. | | `tests/interp/iniparam` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/iniparam`; validates LinuxCNC `_ini[...]` lookup, missing INI-parameter error text, and continued file execution through vendored file execution paths and `INI_FILE_NAME`. | diff --git a/wasm-port/docs/source-reuse-map.md b/wasm-port/docs/source-reuse-map.md index c810f0d..d4298fb 100644 --- a/wasm-port/docs/source-reuse-map.md +++ b/wasm-port/docs/source-reuse-map.md @@ -44,7 +44,7 @@ Current validation is intentionally mechanical: | Representative sim-config machine programs | `configs/sim/axis/foam/*`, `configs/sim/axis/geometry/M110`, `xyzc.ini`, `xyzc.ngc`, `configs/sim/axis/external_offsets/M111`, `dyn_demo.ngc`, `dynamic_offsets.ini`, `eoffsets.ngc`, `eoffsets.ini`, `jwp_z.ngc`, `jwp_z.ini`, `opa_demo.ngc`, `opa.ini`, `circles.ngc`, `eoffset.tbl`, and `configs/sim/axis/sim.tbl` | Copy unchanged | The `foam`, `xyzc`, and external-offset sample programs remain LinuxCNC sim-config assets. The standalone boundary only copies INI, tool table, G-code, executable user-M files, and `SUBROUTINE_PATH` files into the native or WASM filesystem, then calls vendored LinuxCNC INI parsing and `Interp::open()`/`read()`/`execute()` through the existing machine-config adapter. The native sim-config harness now prefers `[DISPLAY]OPEN_FILE` when several INI files live beside a program, so each program is judged with its corresponding machine context. The JS SDK `runSimConfigProgram()` is only the host file-staging helper for this boundary: it writes caller-provided text files to the Emscripten filesystem, applies executable bits, and forwards to LinuxCNC-backed C ABI entry points. `M110`/`M111` process execution stays a runtime boundary represented by deterministic `USER_M_COMMAND` canonical events | Vendor byte sync, `tests/native/verify_sim_configs.sh`, `tests/wasm/node/verify_sim_configs_wasm.sh`, `tests/browser/verify_interp_browser.sh` | | Representative `nc_files` examples | `nc_files/3D_Chips.ngc`, `nc_files/arcspiral.ngc`, `nc_files/factorial.ngc`, `nc_files/hole-circle.ngc`, `nc_files/m6demo.ngc` | Copy unchanged | These upstream `linuxcnc/nc_files` examples are copied byte-for-byte into the WASM vendor tree after the native `nc_files` harness classifies the broader directory. Node and browser tests only stage the original `.ngc` text and, for `3D_Chips.ngc`, the minimal INI-declared tool table context required by its upstream `T1 M6` line in the Emscripten filesystem, then call the LinuxCNC-backed `Interp::open()`, `read()`, and `execute()` path through the existing SDK; no G-code, O-word, tool-change, or M-code behavior is implemented in JavaScript | Vendor byte sync, `tests/native/verify_nc_files.sh`, `tests/wasm/node/verify_nc_files_wasm.sh`, `tests/browser/verify_interp_browser.sh`, `tests/host/verify_host_smokes.sh` | | LinuxCNC remap regression fixtures | `tests/remap/duplicate-o-word/*`, `tests/remap/fail/args.0/*`, `tests/remap/fail/args.1/*`, `tests/remap/fail/args.2/*`, `tests/remap/fail/body-ngc/*`, `tests/remap/m30-interaction/*`, `tests/remap/nested-remaps-oword/*`, `tests/remap/posargs.0/*`, `tests/remap/sequencing/*`, selected NGC-only `tests/remap/remap-io/test-ngc.ini` plus `io_*.ngc`, and `src/emc/rs274ngc/interp_remap.cc` plus `interp_o_word.cc` | Copy unchanged | The upstream duplicate O-word, NGC-only remap failure, M30/remap-level interaction, nested O-word remap, positional-argument remap, G/M remap sequencing, and remap-IO NGC subroutine regressions remain LinuxCNC REMAP/O-word/file or MDI execution tests. The standalone boundary only copies the upstream test files into native or WASM filesystems, reads LinuxCNC INI `SUBROUTINE_PATH`, `REMAP`, and `OWORD_NARGS` entries, and calls vendored `Interp::parse_remap()`, `open()`, `read()`, and `execute()` or feeds the upstream remap-IO MDI sequence into vendored `Interp::execute()`; the continue-on-error runner path only mirrors LinuxCNC `rs274 -n 0` test execution and does not implement duplicate-label, O-word, nested remap, M30, positional-argument, failure, sequencing, M62-M68, M66 input, or remap semantics | Vendor byte sync, `linuxcnc_duplicate_oword_remap_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/browser/verify_interp_browser.sh` | -| LinuxCNC interpreter regression fixtures | `tests/interp/do-while-break/*`, `tests/interp/oword-bug315/*`, `tests/interp/oword-bug315-p2/*`, `tests/interp/exists/*`, `tests/interp/return-value/*`, `tests/interp/subs-follow-main/*`, `tests/interp/fractional-linenumbers/*`, `tests/interp/namedparam-bug424/*`, `tests/interp/flowsnake/*`, selected `tests/interp/bad/*.ngc` file-error fixtures, `tests/interp/g33.1/*`, selected `tests/interp/rotation/*` pure interpreter cases, `tests/interp/iniparam/*`, `tests/interp/iniparam-failassign/*`, `tests/interp/m19/*`, `tests/interp/magic_comments/param_format_printing/*`, selected `tests/interp/m98m99/*` pure interpreter cases, `tests/interp/sub-call-from-sub/*`, `tests/interp/sequence-number/*`, `tests/interp/nested-sub-error/*`, `tests/interp/nested-sub-in-file-error/*`, `tests/interp/abort-hot-comment/*`, plus vendored interpreter/O-word sources including `interp_o_word.cc`, `interp_read.cc`, `interp_execute.cc`, `interp_find.cc`, `interp_namedparams.cc`, and `rs274ngc_pre.cc` | Copy unchanged | The upstream do/while/break, O-word bug315, `EXISTS[]`, subroutine return-value, subs-after-main, fractional line-number, named-parameter, recursive O-word flowsnake toolpath, selected file-execution error cases, rigid-tap `G33.1`, selected rotation/G53/G28 absolute-position and endpoint, INI named-parameter lookup/read-only protection, M19 spindle-orient offset/timeout handling, magic-comment parameter formatting, selected Fanuc `M98/M99` and O-expression call regressions, external-subroutine-call, external-subroutine line-number, nested-subroutine-definition rejection, blocked forward-seek-to-later-numbered-sub, and `(ABORT,...)` hot-comment parameter-expansion regressions remain LinuxCNC interpreter file-execution tests. The standalone boundary only vendors the original upstream assets, copies `*.ngc`, `test.ini`, `test.tbl`, `subs/*.ngc`, and referenced external subroutine `.ngc` files into native or WASM filesystems where applicable, sets the LinuxCNC `INI_FILE_NAME` runtime edge for `_ini[...]`, applies LinuxCNC INI machine settings such as `[RS274NGC]ORIENT_OFFSET`, reads LinuxCNC INI `SUBROUTINE_PATH`, captures LinuxCNC `(PRINT,...)` output through the existing stdout/Emscripten `print` boundary, and calls vendored `Interp::open()`, `read()`, and `execute()`; it does not implement O-word loop, break, subroutine, dynamic call, `M98/M99`, `EXISTS[]`, named-parameter, recursive O-word toolpath generation, rigid tap, absolute-position named-parameter, G28/G53 endpoint, INI-variable, read-only parameter, line-number, spindle-speed, spindle-orient, magic-comment formatting, subroutine lookup, ABORT hot-comment, error, or branch semantics | Vendor byte sync, `linuxcnc_interp_minimal_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/browser/verify_interp_browser.sh` | +| LinuxCNC interpreter regression fixtures | `tests/interp/do-while-break/*`, `tests/interp/oword-bug315/*`, `tests/interp/oword-bug315-p2/*`, `tests/interp/exists/*`, `tests/interp/return-value/*`, `tests/interp/subs-follow-main/*`, `tests/interp/fractional-linenumbers/*`, `tests/interp/namedparam-bug424/*`, `tests/interp/flowsnake/*`, selected `tests/interp/bad/*.ngc` file-error fixtures, `tests/interp/g33.1/*`, selected `tests/interp/rotation/*` pure interpreter cases, `tests/interp/iniparam/*`, `tests/interp/iniparam-failassign/*`, `tests/interp/m19/*`, `tests/interp/magic_comments/param_format_printing/*`, selected `tests/interp/m98m99/*` pure interpreter cases, `tests/interp/sub-call-from-sub/*`, `tests/interp/sequence-number/*`, `tests/interp/nested-sub-error/*`, `tests/interp/nested-sub-in-file-error/*`, `tests/interp/abort-hot-comment/*`, plus vendored interpreter/O-word sources including `interp_o_word.cc`, `interp_read.cc`, `interp_execute.cc`, `interp_find.cc`, `interp_namedparams.cc`, and `rs274ngc_pre.cc` | Copy unchanged | The upstream do/while/break, O-word bug315, `EXISTS[]`, subroutine return-value, subs-after-main, fractional line-number, named-parameter, recursive O-word flowsnake toolpath, selected file-execution error cases including malformed `EXISTS[]`, rigid-tap `G33.1`, selected rotation/G53/G28 absolute-position and endpoint, INI named-parameter lookup/read-only protection, M19 spindle-orient offset/timeout handling, magic-comment parameter formatting, selected Fanuc `M98/M99` and O-expression call regressions, external-subroutine-call, external-subroutine line-number, nested-subroutine-definition rejection, blocked forward-seek-to-later-numbered-sub, and `(ABORT,...)` hot-comment parameter-expansion regressions remain LinuxCNC interpreter file-execution tests. The standalone boundary only vendors the original upstream assets, copies `*.ngc`, `test.ini`, `test.tbl`, `subs/*.ngc`, and referenced external subroutine `.ngc` files into native or WASM filesystems where applicable, sets the LinuxCNC `INI_FILE_NAME` runtime edge for `_ini[...]`, applies LinuxCNC INI machine settings such as `[RS274NGC]ORIENT_OFFSET`, reads LinuxCNC INI `SUBROUTINE_PATH`, captures LinuxCNC `(PRINT,...)` output through the existing stdout/Emscripten `print` boundary, and calls vendored `Interp::open()`, `read()`, and `execute()`; it does not implement O-word loop, break, subroutine, dynamic call, `M98/M99`, `EXISTS[]`, named-parameter, recursive O-word toolpath generation, rigid tap, absolute-position named-parameter, G28/G53 endpoint, INI-variable, read-only parameter, line-number, spindle-speed, spindle-orient, magic-comment formatting, subroutine lookup, ABORT hot-comment, error, or branch semantics | Vendor byte sync, `linuxcnc_interp_minimal_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/browser/verify_interp_browser.sh` | | Additional non-switchable kinematics | `src/emc/kinematics/corexykins.c`, `rotatekins.c`, `rosekins.c`, `maxkins.c`, `lineardeltakins.c`, `lineardeltakins-common.h`, `rotarydeltakins.c`, `rotarydeltakins-common.h`, `scorbot-kins.c`, `tripodkins.c`, `scarakins.c`, `pumakins.c`, `pumakins.h`, `genhexkins.c`, `genhexkins.h`, `genserfuncs.c`, `genserkins.c`, `genserkins.h`, `ugenserkins.c`, `pentakins.c`, `pentakins.h`, `cubic.c` | Copy unchanged | HAL pin allocation, HAL parameter allocation, HAL component lifecycle, RTAPI module metadata, Go math C/C++ linkage, switchkins iterative-forward warmup, and userspace test-program process entry remain standalone runtime edges; forward/inverse behavior remains LinuxCNC source where the module exposes it | Vendor byte sync, per-file source probes, `linuxcnc_corexy_kinematics_probe`, `linuxcnc_rotate_kinematics_probe`, `linuxcnc_rose_kinematics_probe`, `linuxcnc_max_kinematics_probe`, `linuxcnc_lineardelta_kinematics_probe`, `linuxcnc_rotarydelta_kinematics_probe`, `linuxcnc_scorbot_kinematics_probe`, `linuxcnc_tripod_kinematics_probe`, `linuxcnc_scara_kinematics_probe`, `linuxcnc_puma_kinematics_probe`, `linuxcnc_genser_kinematics_probe`, `linuxcnc_genhex_kinematics_probe`, `linuxcnc_pentakins_kinematics_probe` | | Trajectory planner | `src/emc/tp/tp.c`, `tc.c`, `tcq.c`, `spherical_arc.c`, `blendmath.c`, `sp_scurve.c`, `ruckig_wrapper.c`, plus matching `*.h` files | Copy unchanged | Native realtime scheduling and motion process state are replaced by standalone probe setup; the WASM TP probe uses the same deterministic status/config boundary and calls vendored TP APIs through a narrow C ABI | Vendor byte sync, per-file source probes, `linuxcnc_tp_api_probe`, `tests/wasm/node/verify_tp_wasm.sh` | | Ruckig C planner support | Selected `src/emc/tp/cruckig/*.c` and `*.h` files in the manifest | Copy unchanged | Used as LinuxCNC planner support code through vendored TP sources | Vendor byte sync, per-file source probes, `tests/wasm/node/verify_tp_wasm.sh` | diff --git a/wasm-port/tests/browser/interp_smoke.html b/wasm-port/tests/browser/interp_smoke.html index 3a1dcf9..5d68844 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -1564,6 +1564,55 @@ ); for (const badFixture of [ + { + name: "exists_1", + file: "exists-1.ngc", + readCount: 2, + executeCount: 1, + errorText: "Expected # reading parameter", + }, + { + name: "exists_2", + file: "exists-2.ngc", + readCount: 2, + executeCount: 1, + errorText: "Expected ] reading bracketed parameter", + }, + { + name: "exists_3", + file: "exists-3.ngc", + readCount: 3, + executeCount: 2, + errorText: "Parameter number out of range", + }, + { + name: "exists_4", + file: "exists-4.ngc", + readCount: 2, + executeCount: 1, + errorText: "Unknown word starting with f", + }, + { + name: "exists_5", + file: "exists-5.ngc", + readCount: 2, + executeCount: 1, + errorText: "Named parameter not terminated", + }, + { + name: "exists_6", + file: "exists-6.ngc", + readCount: 2, + executeCount: 1, + errorText: "bad number format (conversion failed) parsing ''", + }, + { + name: "exists_7", + file: "exists-7.ngc", + readCount: 2, + executeCount: 1, + errorText: "Expected ] reading bracketed parameter", + }, { name: "nested", file: "nested.ngc", diff --git a/wasm-port/tests/native/verify_native_probes.sh b/wasm-port/tests/native/verify_native_probes.sh index 3a5bb18..d79fad8 100755 --- a/wasm-port/tests/native/verify_native_probes.sh +++ b/wasm-port/tests/native/verify_native_probes.sh @@ -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" diff --git a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs index 6e417f1..a23685b 100644 --- a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs +++ b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs @@ -1272,6 +1272,55 @@ verifyExpectedOutput( ); for (const badFixture of [ + { + name: "exists_1", + file: "exists-1.ngc", + readCount: 2, + executeCount: 1, + errorText: "Expected # reading parameter", + }, + { + name: "exists_2", + file: "exists-2.ngc", + readCount: 2, + executeCount: 1, + errorText: "Expected ] reading bracketed parameter", + }, + { + name: "exists_3", + file: "exists-3.ngc", + readCount: 3, + executeCount: 2, + errorText: "Parameter number out of range", + }, + { + name: "exists_4", + file: "exists-4.ngc", + readCount: 2, + executeCount: 1, + errorText: "Unknown word starting with f", + }, + { + name: "exists_5", + file: "exists-5.ngc", + readCount: 2, + executeCount: 1, + errorText: "Named parameter not terminated", + }, + { + name: "exists_6", + file: "exists-6.ngc", + readCount: 2, + executeCount: 1, + errorText: "bad number format (conversion failed) parsing ''", + }, + { + name: "exists_7", + file: "exists-7.ngc", + readCount: 2, + executeCount: 1, + errorText: "Expected ] reading bracketed parameter", + }, { name: "nested", file: "nested.ngc", diff --git a/wasm-port/tools/build_native_probes.sh b/wasm-port/tools/build_native_probes.sh index 937ffa6..7b60eb8 100755 --- a/wasm-port/tools/build_native_probes.sh +++ b/wasm-port/tools/build_native_probes.sh @@ -18,6 +18,13 @@ SUBS_FOLLOW_MAIN_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/subs-follow-mai FRACTIONAL_LINENUMBERS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/fractional-linenumbers/test.ngc" NAMEDPARAM_BUG424_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/namedparam-bug424/test.ngc" FLOWSNAKE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/flowsnake/flowsnake.ngc" +BAD_EXISTS_1_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-1.ngc" +BAD_EXISTS_2_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-2.ngc" +BAD_EXISTS_3_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-3.ngc" +BAD_EXISTS_4_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-4.ngc" +BAD_EXISTS_5_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-5.ngc" +BAD_EXISTS_6_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-6.ngc" +BAD_EXISTS_7_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-7.ngc" BAD_NESTED_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/nested.ngc" BAD_NO_FEED_RATE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/no-feed-rate.ngc" BAD_NO_IJR_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/no-ijr.ngc" @@ -1474,6 +1481,13 @@ run_interp_minimal_fixture subs_follow_main "$SUBS_FOLLOW_MAIN_FIXTURE" run_interp_minimal_fixture fractional_linenumbers "$FRACTIONAL_LINENUMBERS_FIXTURE" run_interp_minimal_fixture namedparam_bug424 "$NAMEDPARAM_BUG424_FIXTURE" run_interp_minimal_fixture flowsnake "$FLOWSNAKE_FIXTURE" +run_interp_minimal_fixture bad_exists_1 "$BAD_EXISTS_1_FIXTURE" +run_interp_minimal_fixture bad_exists_2 "$BAD_EXISTS_2_FIXTURE" +run_interp_minimal_fixture bad_exists_3 "$BAD_EXISTS_3_FIXTURE" +run_interp_minimal_fixture bad_exists_4 "$BAD_EXISTS_4_FIXTURE" +run_interp_minimal_fixture bad_exists_5 "$BAD_EXISTS_5_FIXTURE" +run_interp_minimal_fixture bad_exists_6 "$BAD_EXISTS_6_FIXTURE" +run_interp_minimal_fixture bad_exists_7 "$BAD_EXISTS_7_FIXTURE" run_interp_minimal_fixture bad_nested "$BAD_NESTED_FIXTURE" run_interp_minimal_fixture bad_no_feed_rate "$BAD_NO_FEED_RATE_FIXTURE" run_interp_minimal_fixture bad_no_ijr "$BAD_NO_IJR_FIXTURE" diff --git a/wasm-port/tools/source-manifest.txt b/wasm-port/tools/source-manifest.txt index 89dd2a8..e77b679 100644 --- a/wasm-port/tools/source-manifest.txt +++ b/wasm-port/tools/source-manifest.txt @@ -284,6 +284,13 @@ tests/interp/flowsnake/README tests/interp/flowsnake/expected tests/interp/flowsnake/flowsnake.ngc tests/interp/flowsnake/test.sh +tests/interp/bad/exists-1.ngc +tests/interp/bad/exists-2.ngc +tests/interp/bad/exists-3.ngc +tests/interp/bad/exists-4.ngc +tests/interp/bad/exists-5.ngc +tests/interp/bad/exists-6.ngc +tests/interp/bad/exists-7.ngc tests/interp/bad/nested.ngc tests/interp/bad/no-feed-rate.ngc tests/interp/bad/no-ijr.ngc diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-1.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-1.ngc new file mode 100644 index 0000000..1f26ec4 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-1.ngc @@ -0,0 +1,3 @@ +(Expected # reading parameter) +G0 X EXISTS[1] +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-2.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-2.ngc new file mode 100644 index 0000000..62d4a87 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-2.ngc @@ -0,0 +1,3 @@ +(Expected ] reading bracketed parameter) +G0 X EXISTS[#1+#2] +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-3.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-3.ngc new file mode 100644 index 0000000..8020e6e --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-3.ngc @@ -0,0 +1,4 @@ +(Parameter number out of range) +#2=99999 +G0 X EXISTS[###2] +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-4.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-4.ngc new file mode 100644 index 0000000..3b28908 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-4.ngc @@ -0,0 +1,3 @@ +(Unknown word starting with f) +G0 X EXISTS[#foo] +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-5.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-5.ngc new file mode 100644 index 0000000..d7d075a --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/exists-5.ngc @@ -0,0 +1,3 @@ +(Named parameter not terminated) +G0 X EXISTS[#+1] +M2