aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-07-24 16:15:46 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-07-24 16:15:46 +0200
commit378b9da1476cdcac14332b89f6286a450c4a7757 (patch)
tree0245cc5fbf5b79ff50c327fbd939886e61c6fc4b
parent1ce474195699345584aaa5a8999d3158d7d8ed87 (diff)
fixed lexer initialization if $SCITECOPATH happens to contain glob characters
* Always use ^ENq instead of ^EQq in the first argument of `EN`. * Added a "Globbing" test case - globbing was undertested anyway.
-rw-r--r--lib/lexer.tes2
-rw-r--r--tests/testsuite.at7
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/lexer.tes b/lib/lexer.tes
index af6793a..f7c1ae4 100644
--- a/lib/lexer.tes
+++ b/lib/lexer.tes
@@ -26,7 +26,7 @@
!* Automatically mung all the lexers and add them to "lexer.auto" *!
[*
EQ.[lexers]
- [_ 1ENQ[$SCITECOPATH]/lexers/*.tes ]_ J
+ [_ 1ENN[$SCITECOPATH]/lexers/*.tes ]_ J
<:L;R
0X.[filename] 4R .U.p <-A-^^/"= 1; ':R;> .,Q.pX.[name]
EIQ.[filename]
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 887a833..a1a563d 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -312,6 +312,13 @@ AT_DATA([test.txt], [[0123456789
TE_CHECK([[@ER"test.txt" ^S+11"N(0/0)']], 0, ignore, ignore)
AT_CLEANUP
+AT_SETUP([Globbing])
+# This is from the source tree - there should be plenty of lexers
+TE_CHECK([[1@EN|^EN[$SCITECOPATH]/lexers/*.tes|| ."=(0/0)' :^Q-50"<(0/0)']], 0, ignore, ignore)
+TE_CHECK([[1:@EN|^EN[$srcdir]/*.in||"F(0/0)']], 0, ignore, ignore)
+TE_CHECK([[:@EN/[аб]?/бЖ/"F(0/0)']], 0, ignore, ignore)
+AT_CLEANUP
+
AT_SETUP([Macro calls])
TE_CHECK([[@^Ua{-$$} Ma+1"N(0/0)']], 0, ignore, ignore)
AT_CLEANUP