aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/testsuite.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at26
1 files changed, 18 insertions, 8 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 95c1336..cbb12d4 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -274,15 +274,15 @@ TE_CHECK([[@EB'words-example.txt' Z-4J 2Y .-18"N(0/0)' 2C @Y Z-19"N(0/0)']], 0,
AT_CLEANUP
AT_SETUP([Searches])
-# FIXME: We cannot currently easily insert a single ASCII 5 (^E), as it must be followed
-# by a 2nd character. It can be quoted, but cannot be written as Caret+E.
-# You also cannot search for a single ASCII 5 using Caret+E.
-# 2 additional ^Q are translated to a single ^Q and interpreted at the search-pattern layer.
-TE_CHECK(m4_format([[@I/^Q%c/ J @:S/^Q^Q^Q%c/"F(0/0)']], 5, 5), 0, ignore, ignore)
+# Searching for ^E (5)
+TE_CHECK([[5@I// J @:S/^Q^Q^E<5>/"F(0/0)']], 0, ignore, ignore)
+TE_CHECK([[@I/АБВГД/ J :@S/в/"F(0/0)' .-3"N(0/0)']], 0, ignore, ignore)
# Canse-sensitive search
TE_CHECK([[@I/XXX/J -^X @:S/xxx/"S(0/0)']], 0, ignore, ignore)
+TE_CHECK([[@I/АБВГД/J -^X :@S/в/"S(0/0)']], 0, ignore, ignore)
# Search mode should be local to the macro frame.
TE_CHECK([[-^X @^Um{^X} Mm-0"N(0/0)']], 0, ignore, ignore)
+# Anchored search
TE_CHECK([[@I/XYZ/ J ::@S/X/"F(0/0)' H::@S/Z/"S(0/0)']], 0, ignore, ignore)
AT_CLEANUP
@@ -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
@@ -387,6 +394,11 @@ TE_CHECK([[0EE 255@I/A/J 65001EE 0A-(-2)"N(0/0)' 1A-^^A"N(0/0)' 2A-(-1)"N(0/0)']
TE_CHECK([[@EQa// 0EE 128@I/A/J 65001EE 0Qa-(-2)"N(0/0)' 1Qa-^^A"N(0/0)' 2Qa-(-1)"N(0/0)']], 0, ignore, ignore)
AT_CLEANUP
+AT_SETUP([Glyphs to byte heuristics])
+# Should be fast.
+TE_CHECK([[100000<@I"Ж"> J<:C;> J<.-1:J;> .*2-^E"N(0/0)']], 0, ignore, ignore)
+AT_CLEANUP
+
AT_SETUP([Automatic EOL normalization])
TE_CHECK([[@EB'^EQ[$srcdir]/autoeol-input.txt' EL-2"N(0/0)' 2LR 13@I'' 0EL @EW'autoeol-sciteco.txt']],
0, ignore, ignore)
@@ -535,9 +547,7 @@ AT_CLEANUP
# It could fail because the memory limit is exceeed,
# but not in this case since the match string isn't too large.
AT_SETUP([Pattern matching overflow])
-# NOTE: Creating very long lines would currently be ineffective
-# at least in UTF-8 mode.
-TE_CHECK([[100000<@I"^J">J @S"^EM^X"]], 0, ignore, ignore)
+TE_CHECK([[100000<@I"X">J @S"^EM^X"]], 0, ignore, ignore)
AT_CLEANUP
AT_SETUP([Block-wise backwards search])