rargs
rargs copied to clipboard
Unit test failed on Windows
Ran cargo test for testing unit test and two tests failed on a Windows machine.
The error of a cargo test looks like:
running 15 tests test test_field_separator ... FAILED test regex_should_match ... FAILED test test_default_delimiter ... FAILED test test_delimiter ... FAILED test test_global_field_separator ... FAILED test test_line_num_should_work ... FAILED test test_no_read0 ... ok test test_negtive_regex_group_should_work ... FAILED test test_range_both ... FAILED test test_range_left_inf ... FAILED test test_range_right_inf ... FAILED test test_read0_long ... FAILED test test_read0_short ... FAILED test test_regex_group_name_should_match ... FAILED test test_start_num_should_be_working ... FAILED
failures:
---- test_field_separator stdout ----
thread 'test_field_separator' panicked at 'Assertion failed for ./target/release/rargs -d , echo X{3..4:_}X
with: Unexpected stdout
with: Didn't match. diff= ``-X3_4X
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- regex_should_match stdout ----
thread 'regex_should_match' panicked at 'Assertion failed for `./target/release/rargs -p ^(?P<year>\d{4})-(\d{2})-(\d{2})$ echo {1} {2} {3}`
with: Unexpected stdout
with: Didn't match.
diff=
``-2018 01 20
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_default_delimiter stdout ----
thread 'test_default_delimiter' panicked at 'Assertion failed for `./target/release/rargs echo X{1},{2},{3}X`
with: Unexpected stdout
with: Didn't match.
diff=
``-Xa,b,cX
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_delimiter stdout ----
thread 'test_delimiter' panicked at 'Assertion failed for `./target/release/rargs -d , echo X{1},{2},{3},{4}X`
with: Unexpected stdout
with: Didn't match.
diff=
``-Xa,b,,cX
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_global_field_separator stdout ----
thread 'test_global_field_separator' panicked at 'Assertion failed for `./target/release/rargs -d , -s / echo X{3..4}X`
with: Unexpected stdout
with: Didn't match.
diff=
``-X3/4X
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_line_num_should_work stdout ----
thread 'test_line_num_should_work' panicked at 'Assertion failed for `./target/release/rargs echo {LN} {}`
with: Unexpected stdout
with: Didn't match.
diff=
``-1 line 1
2 line 2
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_negtive_regex_group_should_work stdout ----
thread 'test_negtive_regex_group_should_work' panicked at 'Assertion failed for `./target/release/rargs -p ^(?P<year>\d{4})-(\d{2})-(\d{2})$ echo {-3} {-2} {-1}`
with: Unexpected stdout
with: Didn't match.
diff=
``-2018 01 20
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_range_both stdout ----
thread 'test_range_both' panicked at 'Assertion failed for `./target/release/rargs -d , echo X{3..3}X`
with: Unexpected stdout
with: Didn't match.
diff=
``-X3X
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_range_left_inf stdout ----
thread 'test_range_left_inf' panicked at 'Assertion failed for `./target/release/rargs -d , echo X{..3}X`
with: Unexpected stdout
with: Didn't match.
diff=
``-X1 2 3X
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_range_right_inf stdout ----
thread 'test_range_right_inf' panicked at 'Assertion failed for `./target/release/rargs -d , echo X{3..}X`
with: Unexpected stdout
with: Didn't match.
diff=
``-X3 4 5 6X
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_read0_long stdout ----
thread 'test_read0_long' panicked at 'Assertion failed for `./target/release/rargs --read0 echo {}`
with: Unexpected stdout
with: Didn't match.
diff=
``-a
b
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_read0_short stdout ----
thread 'test_read0_short' panicked at 'Assertion failed for `./target/release/rargs -0 echo {}`
with: Unexpected stdout
with: Didn't match.
diff=
``-a
b
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_regex_group_name_should_match stdout ----
thread 'test_regex_group_name_should_match' panicked at 'Assertion failed for `./target/release/rargs -p ^(?P<year>\d{4})-(\d{2})-(\d{2})$ echo {year} {2} {3}`
with: Unexpected stdout
with: Didn't match.
diff=
``-2018 01 20
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
---- test_start_num_should_be_working stdout ----
thread 'test_start_num_should_be_working' panicked at 'Assertion failed for `./target/release/rargs -n 10 echo {LN} {}`
with: Unexpected stdout
with: Didn't match.
diff=
``-10 line 1
11 line 2
```', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\assert_cli-0.6.3\src\assert.rs:441:13
failures:
regex_should_match
test_default_delimiter
test_delimiter
test_field_separator
test_global_field_separator
test_line_num_should_work
test_negtive_regex_group_should_work
test_range_both
test_range_left_inf
test_range_right_inf
test_read0_long
test_read0_short
test_regex_group_name_should_match
test_start_num_should_be_working
test result: FAILED. 1 passed; 14 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s
** rargs version - Rargs 0.3.0 **
** OS version - Windows version 10.0.20348 Build 20348 **