yap-shell-parser 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/yap/shell/parser/version.rb +1 -1
- data/spec/yap/shell/lexer_spec.rb +16 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0f5112fefe27736d9fe13a853af8d68fe0ef467
|
4
|
+
data.tar.gz: b878cc0fab5a610f2d9c301bc298ce57ef446b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ece41ddbb734944259ea26c50c8b3aa1d5ccdfa9592dc348c210ad75af0ac9918bbe872a13dbe2f369a3a5fd7a7ac124f189226c3d369b0cd35588804bc46a5
|
7
|
+
data.tar.gz: 15e8978edc514cd0d81a1521b5872d6766e59b710057bfd5e42699b151e742c39d9d38500335658dfbfdc676b5fa84c241b4c5f282d7cef4d1572181294e5258
|
@@ -701,6 +701,19 @@ describe Yap::Shell::Parser::Lexer do
|
|
701
701
|
]}
|
702
702
|
end
|
703
703
|
|
704
|
+
describe "backticks can be used as part of an argument: git branch `git cbranch`.bak" do
|
705
|
+
let(:str){ "git branch `git cbranch`.bak" }
|
706
|
+
it { should eq [
|
707
|
+
t(:Command, "git", lineno: 0),
|
708
|
+
t(:Argument, "branch", lineno: 0),
|
709
|
+
t(:BeginSubcommand, '`', lineno: 0),
|
710
|
+
t(:Command, 'git', lineno: 0),
|
711
|
+
t(:Argument, 'cbranch', lineno: 0),
|
712
|
+
t(:EndSubcommand, '`', lineno: 0),
|
713
|
+
t(:Argument, '.bak', lineno: 0)
|
714
|
+
]}
|
715
|
+
end
|
716
|
+
|
704
717
|
describe "backticks can wrap complex statements: `ls -al && foo bar || baz`" do
|
705
718
|
let(:str){ "`ls -al && foo bar || baz`" }
|
706
719
|
it { should eq [
|
@@ -755,9 +768,9 @@ describe Yap::Shell::Parser::Lexer do
|
|
755
768
|
end
|
756
769
|
|
757
770
|
describe "dollar-sign paren can wrap complex statements: $(ls -al && foo bar || baz)" do
|
758
|
-
let(:str){ "
|
771
|
+
let(:str){ "$(ls -al && foo bar || baz)" }
|
759
772
|
it { should eq [
|
760
|
-
t(:BeginSubcommand, "
|
773
|
+
t(:BeginSubcommand, "$(", lineno: 0),
|
761
774
|
t(:Command,'ls', lineno: 0),
|
762
775
|
t(:Argument, '-al', lineno: 0),
|
763
776
|
t(:Conditional, '&&', lineno: 0),
|
@@ -765,7 +778,7 @@ describe Yap::Shell::Parser::Lexer do
|
|
765
778
|
t(:Argument, 'bar', lineno: 0),
|
766
779
|
t(:Conditional, '||', lineno: 0),
|
767
780
|
t(:Command, 'baz', lineno: 0),
|
768
|
-
t(:EndSubcommand, "
|
781
|
+
t(:EndSubcommand, ")", lineno: 0)
|
769
782
|
]}
|
770
783
|
end
|
771
784
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yap-shell-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|