Sha256: 93ca055b5a0932d60e1be2ce9c6657b23543d263036dcfd0d12caa614a96d0a8
Contents?: true
Size: 505 Bytes
Versions: 11
Compression:
Stored size: 505 Bytes
Contents
describe Ace::Scanner do it "properly scans" do expect(scan("%test \"a\" hi\n%%\nt: d { { } }\n%%\nhi\n")).to eq [ [:directive, "test", ["a", "hi"]], [:second], [:label, "t"], [:part, "d"], [:block, "{ { } }"], [:third], [:copy, "\nhi\n"] ] end it "throws an error" do expect { scan("% %% %% ") }.to raise_error(Ace::SyntaxError) end def scan(source) Timeout.timeout(5) do Ace::Scanner.scan(source) end end end
Version data entries
11 entries across 11 versions & 1 rubygems