aboutsummaryrefslogtreecommitdiffstats
path: root/src/parse/test.rs
blob: 6cd77936056090125c9f2bd109c05fac1b33a6f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

fn parse(x: &[u8]) -> Ast<PreExpansion> {
    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")]),])),])
        ]),])
    );
}