patch 9.0.0637: syntax of commands in Vim9 script depends on +eval feature
Problem: Syntax of commands in Vim9 script depends on +eval feature.
Solution: Use same syntax with and without the +eval feature.
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 18409d2..9a12f7f 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -12,6 +12,7 @@
# Tests for tiny and small builds.
SCRIPTS_TINY = \
+ test10 \
test20 \
test21 \
test22 \
@@ -22,6 +23,7 @@
test27
SCRIPTS_TINY_OUT = \
+ test10.out \
test20.out \
test21.out \
test22.out \
diff --git a/src/testdir/test10.in b/src/testdir/test10.in
new file mode 100644
index 0000000..40f8e08
--- /dev/null
+++ b/src/testdir/test10.in
@@ -0,0 +1,21 @@
+Test that vim9script also works without the +eval feature.
+
+STARTTEST
+:/^START/+1,/^END/-1:w! Xvim9
+:so Xvim9
+ENDTEST
+
+START
+vim9script
+
+if 1
+ echo 'this is skipped without +eval'
+endif
+
+# colon required for a range
+:$-1,$w! test.out
+qa!
+END
+
+first line
+last line
diff --git a/src/testdir/test10.ok b/src/testdir/test10.ok
new file mode 100644
index 0000000..5776cea
--- /dev/null
+++ b/src/testdir/test10.ok
@@ -0,0 +1,2 @@
+first line
+last line