1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-02 17:01:14 -05:00

test(std/wasi): explicitly assert each expected arg (#6633)

This commit is contained in:
Casper Beyer 2020-07-06 06:03:34 +08:00 committed by GitHub
parent 43db7aa05d
commit 960800888a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");
}