spec/lexer/refcalls_spec.rb in regexp_parser-2.0.3 vs spec/lexer/refcalls_spec.rb in regexp_parser-2.1.0
- old
+ new
@@ -30,9 +30,14 @@
include_examples 'lex', '(abc)\g<1>',
3 => [:backref, :number_call, '\g<1>', 5, 10, 0, 0, 0]
include_examples 'lex', "(abc)\\g'1'",
3 => [:backref, :number_call, "\\g'1'", 5, 10, 0, 0, 0]
+ include_examples 'lex', '\g<0>',
+ 0 => [:backref, :number_call, '\g<0>', 0, 5, 0, 0, 0]
+ include_examples 'lex', "\\g'0'",
+ 0 => [:backref, :number_call, "\\g'0'", 0, 5, 0, 0, 0]
+
include_examples 'lex', '(abc)\g<-1>',
3 => [:backref, :number_rel_call, '\g<-1>', 5, 11, 0, 0, 0]
include_examples 'lex', "(abc)\\g'-1'",
3 => [:backref, :number_rel_call, "\\g'-1'", 5, 11, 0, 0, 0]