aboutsummaryrefslogtreecommitdiffstats
path: root/src/parse/test.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-07 15:46:21 +0100
committerJonas Maier <>2026-03-07 15:46:21 +0100
commit18f79dabf0f4dc399f31b8e87b6ef11b651cea46 (patch)
treeb33395afdb0b0f81c4398042cf304a232402331e /src/parse/test.rs
parent56a1548c9a10a2bfc6ddda0e0d28ae0087aa193f (diff)
downloadpish-18f79dabf0f4dc399f31b8e87b6ef11b651cea46.tar.gz
parse tests
Diffstat (limited to 'src/parse/test.rs')
-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")])]),
+ );
+}