mirror of
https://github.com/uutils/awk.git
synced 2026-06-10 16:15:04 -07:00
tests: fix incorrect argument passing; new test
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
use uutests::new_ucmd;
|
||||
use crate::ucmd;
|
||||
|
||||
#[test]
|
||||
fn empty_program_succeeds() {
|
||||
new_ucmd!().arg("").succeeds();
|
||||
ucmd().arg("").succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "parser does not yet support print/field expressions"]
|
||||
fn print_first_field() {
|
||||
new_ucmd!().arg("{ print $1 }").succeeds();
|
||||
ucmd().args(&["{ print $1 }"]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_args_fails_code_one() {
|
||||
ucmd().fails_with_code(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user