spec/unit/parser_spec.rb in qcmd-0.1.14 vs spec/unit/parser_spec.rb in qcmd-0.1.15
- old
+ new
@@ -64,9 +64,14 @@
it 'should parse strings with parens' do
tokens = Qcmd::Parser.parse %[cue 1 name "this is (not good)"]
tokens.should eql([:cue, 1, :name, 'this is (not good)'])
end
+ it 'should parse multiple commands in a row' do
+ tokens = Qcmd::Parser.parse '(copy-sliders 1 2) (echo "DONE!")'
+ tokens.should eql([[:'copy-sliders', 1, 2], [:echo, "DONE!"]])
+ end
+
## Generating
describe "generating expressions" do
it "should leave string literals intact" do
expression = Qcmd::Parser.generate([:cue, :'$1', :name, 'Hello World'])