Skip to content

Commit

Permalink
add testcase for environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ndtoan96 committed Sep 28, 2023
1 parent 8d24382 commit 1960356
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/external/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,11 @@ mod cmdparse {
let args = parse_cmd_to_args("echo -C%* xyz", &["111", "222"]);
assert_eq!(args, vec!["echo", "-C111 222", "xyz"]);
}

#[test]
fn test_env_var() {
let args = parse_cmd_to_args(" %EDITOR% %* xyz", &["111", "222"]);
assert_eq!(args, vec!["%EDITOR%", "111", "222", "xyz"]);
}
}
}

0 comments on commit 1960356

Please sign in to comment.