From 85ec338beacb7d9e25ff27205d7c05723e173edd Mon Sep 17 00:00:00 2001 From: Sergio Queiroz Date: Fri, 16 Dec 2016 11:02:27 -0300 Subject: Updating tests of 'relabel' syntax --- testrelabelparser.lua | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/testrelabelparser.lua b/testrelabelparser.lua index 1f1a8cf..3f3ad41 100644 --- a/testrelabelparser.lua +++ b/testrelabelparser.lua @@ -1,4 +1,4 @@ -local re = require 'relabel' +local re = require 'relabelrec' function testerror(repatt, msg) msg = msg:match("^%s*(.-)%s*$") -- trim @@ -53,26 +53,26 @@ L1:C5: unexpected characters after the pattern -- testing ExpPatt1 -testerror([['p' /{1}]], [[ -L1:C9: expected a pattern after '/' or the label(s) -'p' /{1} - ^ +testerror([['p' //{1}]], [[ +L1:C10: expected a pattern after '/' or '//{...}' +'p' //{1} + ^ ]]) -testerror([['p' /{1} /{2} 'q']], [[ -L1:C9: expected a pattern after '/' or the label(s) -'p' /{1} /{2} 'q' - ^ +testerror([['p' //{1} //{2} 'q']], [[ +L1:C10: expected a pattern after '/' or '//{...}' +'p' //{1} //{2} 'q' + ^ ]]) testerror([['p' /]], [[ -L1:C6: expected a pattern after '/' or the label(s) +L1:C6: expected a pattern after '/' or '//{...}' 'p' / ^ ]]) testerror([['p' / / 'q']], [[ -L1:C6: expected a pattern after '/' or the label(s) +L1:C6: expected a pattern after '/' or '//{...}' 'p' / / 'q' ^ ]]) @@ -351,10 +351,10 @@ L1:C2: expected the name of a rule after '<' (no space) -- testing ExpLab1 -testerror([['p' /{} 'q']], [[ -L1:C7: expected at least one label after '{' -'p' /{} 'q' - ^ +testerror([['p' //{} 'q']], [[ +L1:C8: expected at least one label after '{' +'p' //{} 'q' + ^ ]]) testerror([[%{ 'label' }]], [[ @@ -365,10 +365,10 @@ L1:C3: expected at least one label after '{' -- testing ExpLab2 -testerror([['p' /{1,2,3,} 'q']], [[ -L1:C13: expected a label after the comma -'p' /{1,2,3,} 'q' - ^ +testerror([['p' //{1,2,3,} 'q']], [[ +L1:C14: expected a label after the comma +'p' //{1,2,3,} 'q' + ^ ]]) -- testing ExpNameOrLab -- cgit v1.2.3-55-g6feb