aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testlabel.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/testlabel.lua b/testlabel.lua
index f7180a7..4f0768d 100644
--- a/testlabel.lua
+++ b/testlabel.lua
@@ -180,6 +180,24 @@ assert(p:match("abc") == 2)
180r, l, serror = p:match("") 180r, l, serror = p:match("")
181assert(r == nil and l == 0 and serror == "") 181assert(r == nil and l == 0 and serror == "")
182 182
183-- testing the limit of labels
184p = m.T(0)
185s = "abc"
186r, l, serror = p:match(s)
187assert(r == nil and l == 0 and serror == "abc")
188
189p = m.T(255)
190s = "abc"
191r, l, serror = p:match(s)
192assert(r == nil and l == 255 and serror == "abc")
193
194local r = pcall(m.T, -1)
195assert(r == false)
196
197local r = pcall(m.T, 256)
198assert(r == false)
199
200
183print("+") 201print("+")
184 202
185--[[ grammar based on Figure 8 of paper submitted to SCP 203--[[ grammar based on Figure 8 of paper submitted to SCP