From c36bf58bd0d3d8d2b89211c0bfccab68dad53d66 Mon Sep 17 00:00:00 2001 From: Jonas Maier <> Date: Sat, 7 Mar 2026 11:35:38 +0100 Subject: finish parsing stuff, add first parsing test --- src/parse/test.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/parse/test.rs (limited to 'src/parse/test.rs') diff --git a/src/parse/test.rs b/src/parse/test.rs new file mode 100644 index 0000000..6cd7793 --- /dev/null +++ b/src/parse/test.rs @@ -0,0 +1,16 @@ +use super::*; + +fn parse(x: &[u8]) -> Ast { + do_parse(x).unwrap() +} + +#[test] +fn command_interp() { + assert_eq!( + parse(br#"echo "$(echo hi)""#), + pipes([cmd([ + estr(b"echo"), + str([cmdp(pipes([cmd([estr(b"echo"), estr(b"hi")]),])),]) + ]),]) + ); +} -- cgit v1.2.3