Sha256: 638ddd48fabfff50a1b502e88527f5a7a7c376e4d14e61f98fb5a37d10845081
Contents?: true
Size: 1.76 KB
Versions: 40
Compression:
Stored size: 1.76 KB
Contents
require 'spec_helper' RSpec.describe('Literal delimiter scanning') do include_examples 'scan', '}', 0 => [:literal, :literal, '}', 0, 1] include_examples 'scan', '}}', 0 => [:literal, :literal, '}}', 0, 2] include_examples 'scan', '{', 0 => [:literal, :literal, '{', 0, 1] include_examples 'scan', '{{', 0 => [:literal, :literal, '{{', 0, 2] include_examples 'scan', '{}', 0 => [:literal, :literal, '{}', 0, 2] include_examples 'scan', '}{', 0 => [:literal, :literal, '}{', 0, 2] include_examples 'scan', '}{+', 0 => [:literal, :literal, '}{', 0, 2] include_examples 'scan', '{{var}}', 0 => [:literal, :literal, '{{var}}', 0, 7] include_examples 'scan', 'a{1,2', 0 => [:literal, :literal, 'a{1,2', 0, 5] include_examples 'scan', '({.+})', 0 => [:group, :capture, '(', 0, 1], 1 => [:literal, :literal, '{', 1, 2], 2 => [:meta, :dot, '.', 2, 3], 3 => [:quantifier, :one_or_more, '+', 3, 4], 4 => [:literal, :literal, '}', 4, 5], 5 => [:group, :close, ')', 5, 6] include_examples 'scan', ']', 0 => [:literal, :literal, ']', 0, 1] include_examples 'scan', ']]', 0 => [:literal, :literal, ']]', 0, 2] include_examples 'scan', ']\[', 0 => [:literal, :literal, ']', 0, 1], 1 => [:escape, :set_open, '\[', 1, 3] include_examples 'scan', '()', 0 => [:group, :capture, '(', 0, 1], 1 => [:group, :close, ')', 1, 2] end
Version data entries
40 entries across 30 versions & 9 rubygems