mirror of
https://github.com/denoland/deno.git
synced 2024-12-12 02:27:46 -05:00
test(std/wasi): explicitly assert each expected arg (#6633)
This commit is contained in:
parent
43db7aa05d
commit
960800888a
1 changed files with 4 additions and 1 deletions
5
std/wasi/testdata/std_env_args.rs
vendored
5
std/wasi/testdata/std_env_args.rs
vendored
|
@ -1,6 +1,9 @@
|
||||||
// { "args": ["one", "two", "three" ]}
|
// { "args": ["one", "two", "three" ]}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = std::env::args();
|
let mut args = std::env::args();
|
||||||
assert_eq!(args.len(), 3);
|
assert_eq!(args.len(), 3);
|
||||||
|
assert_eq!(args.next().unwrap(), "one");
|
||||||
|
assert_eq!(args.next().unwrap(), "two");
|
||||||
|
assert_eq!(args.next().unwrap(), "three");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue