aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse/test.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/parse/test.rs b/src/parse/test.rs
index e1c2077..7efb613 100644
--- a/src/parse/test.rs
+++ b/src/parse/test.rs
@@ -44,3 +44,19 @@ fn simple_string() {
fn simple_var() {
parse_test(parse(b"$foo"), pipes([cmd([str([var(b"foo")])])]));
}
+
+#[test]
+fn ls_pipe_cat() {
+ parse_test(
+ parse(b"ls | cat"),
+ pipes([cmd([estr(b"ls")]), cmd([estr(b"cat")])]),
+ );
+}
+
+#[test]
+fn ls_pipe_cat_nospace() {
+ parse_test(
+ parse(b"ls|cat"),
+ pipes([cmd([estr(b"ls")]), cmd([estr(b"cat")])]),
+ );
+}