aboutsummaryrefslogtreecommitdiffstats
path: root/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/mod.rs4
-rw-r--r--src/parse/test.rs8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs
index 7a514e5..cec9551 100644
--- a/src/parse/mod.rs
+++ b/src/parse/mod.rs
@@ -516,6 +516,10 @@ impl Parse for ExpString {
}
add_char(p, x);
+
+ if delim == b' ' {
+ already_parsed = true;
+ }
}
if b.has() && b"\"'".contains(&b.peek()) {
diff --git a/src/parse/test.rs b/src/parse/test.rs
index 9a7e359..2ea3f9c 100644
--- a/src/parse/test.rs
+++ b/src/parse/test.rs
@@ -34,3 +34,11 @@ fn string_concat() {
pipes([cmd([estr(b"foobarbaz")])]),
);
}
+
+#[test]
+fn simple_string() {
+ parse_test(
+ parse(b"foo"),
+ pipes([cmd([estr(b"foo")])]),
+ );
+}