Skip to content

Commit

Permalink
test(std/wasi): explicitly assert each expected arg (denoland#6633)
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervonb committed Jul 5, 2020
1 parent 43db7aa commit 9608008
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion std/wasi/testdata/std_env_args.rs
@@ -1,6 +1,9 @@
// { "args": ["one", "two", "three" ]}

fn main() {
let args = std::env::args();
let mut args = std::env::args();
assert_eq!(args.len(), 3);
assert_eq!(args.next().unwrap(), "one");
assert_eq!(args.next().unwrap(), "two");
assert_eq!(args.next().unwrap(), "three");
}

0 comments on commit 9608008

Please sign in to comment.