From e5b577fb27c33c8c539dfbaf3b050e71e47fb7e2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 18 Mar 2021 10:13:29 +0100 Subject: [PATCH 1/2] Update cargo.lock --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dcc23ff2..78aef58bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -193,7 +193,7 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.85 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -404,7 +404,7 @@ dependencies = [ "oorandom 11.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "plotters 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.124 (registry+https://github.com/rust-lang/crates.io-index)", "serde_cbor 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.124 (registry+https://github.com/rust-lang/crates.io-index)", @@ -517,7 +517,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1035,7 +1035,7 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.4" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1471,7 +1471,7 @@ version = "0.0.4" dependencies = [ "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.7", "uucore_procs 0.0.5", @@ -1557,7 +1557,7 @@ dependencies = [ name = "uu_expand" version = "0.0.4" dependencies = [ - "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.7", "uucore_procs 0.0.5", @@ -1634,7 +1634,7 @@ dependencies = [ "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.85 (registry+https://github.com/rust-lang/crates.io-index)", "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.23 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1838,7 +1838,7 @@ dependencies = [ "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.85 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.23 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.7", "uucore_procs 0.0.5", @@ -1939,7 +1939,7 @@ dependencies = [ "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.85 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.23 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.7", "uucore_procs 0.0.5", @@ -2598,7 +2598,7 @@ dependencies = [ "checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" "checksum redox_syscall 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" "checksum redox_termios 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f" -"checksum regex 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "54fd1046a3107eb58f42de31d656fee6853e5d276c455fd943742dce89fc3dd3" +"checksum regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" "checksum regex-automata 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" "checksum regex-syntax 0.6.23 (registry+https://github.com/rust-lang/crates.io-index)" = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" "checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" From 1d271991af968e0884bfef4e91f9b8d3753915b0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 18 Mar 2021 10:24:30 +0100 Subject: [PATCH 2/2] Rustfmt new tests --- tests/by-util/test_cat.rs | 22 +++++++++++----------- tests/by-util/test_nice.rs | 4 +++- tests/by-util/test_nl.rs | 16 ++++++++-------- tests/by-util/test_rm.rs | 2 +- tests/by-util/test_rmdir.rs | 8 ++++---- tests/by-util/test_unlink.rs | 6 +++--- tests/by-util/test_wc.rs | 2 +- 7 files changed, 31 insertions(+), 29 deletions(-) diff --git a/tests/by-util/test_cat.rs b/tests/by-util/test_cat.rs index a3e321139..b194eb9b0 100644 --- a/tests/by-util/test_cat.rs +++ b/tests/by-util/test_cat.rs @@ -10,16 +10,16 @@ fn test_output_multi_files_print_all_chars() { .succeeds() .stdout_only( " 1\tabcde$\n 2\tfghij$\n 3\tklmno$\n 4\tpqrst$\n \ - 5\tuvwxyz$\n 6\t^@^A^B^C^D^E^F^G^H^I$\n \ - 7\t^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\\^]^^^_ \ - !\"#$%&\'()*+,-./0123456789:;\ - <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~^?M-^@M-^AM-^\ - BM-^CM-^DM-^EM-^FM-^GM-^HM-^IM-^JM-^KM-^LM-^MM-^NM-^OM-^PM-^QM-^RM-^SM-^TM-^UM-^V\ - M-^WM-^XM-^YM-^ZM-^[M-^\\M-^]M-^^M-^_M- \ - M-!M-\"M-#M-$M-%M-&M-\'M-(M-)M-*M-+M-,M--M-.M-/M-0M-1M-2M-3M-4M-5M-6M-7M-8M-9M-:\ - M-;M-M-?M-@M-AM-BM-CM-DM-EM-FM-GM-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-U\ - M-VM-WM-XM-YM-ZM-[M-\\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-oM-\ - pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^?", + 5\tuvwxyz$\n 6\t^@^A^B^C^D^E^F^G^H^I$\n \ + 7\t^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\\^]^^^_ \ + !\"#$%&\'()*+,-./0123456789:;\ + <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~^?M-^@M-^AM-^\ + BM-^CM-^DM-^EM-^FM-^GM-^HM-^IM-^JM-^KM-^LM-^MM-^NM-^OM-^PM-^QM-^RM-^SM-^TM-^UM-^V\ + M-^WM-^XM-^YM-^ZM-^[M-^\\M-^]M-^^M-^_M- \ + M-!M-\"M-#M-$M-%M-&M-\'M-(M-)M-*M-+M-,M--M-.M-/M-0M-1M-2M-3M-4M-5M-6M-7M-8M-9M-:\ + M-;M-M-?M-@M-AM-BM-CM-DM-EM-FM-GM-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-U\ + M-VM-WM-XM-YM-ZM-[M-\\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-oM-\ + pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^?", ); } @@ -30,7 +30,7 @@ fn test_numbered_lines_no_trailing_newline() { .succeeds() .stdout_only( " 1\ttext without a trailing newlineabcde\n 2\tfghij\n \ - 3\tklmno\n 4\tpqrst\n 5\tuvwxyz\n", + 3\tklmno\n 4\tpqrst\n 5\tuvwxyz\n", ); } diff --git a/tests/by-util/test_nice.rs b/tests/by-util/test_nice.rs index e10314f57..7e704fc00 100644 --- a/tests/by-util/test_nice.rs +++ b/tests/by-util/test_nice.rs @@ -15,7 +15,9 @@ fn test_negative_adjustment() { // correctly. let res = new_ucmd!().args(&["-n", "-1", "true"]).run(); - assert!(res.stderr.starts_with("nice: warning: setpriority: Permission denied")); + assert!(res + .stderr + .starts_with("nice: warning: setpriority: Permission denied")); } #[test] diff --git a/tests/by-util/test_nl.rs b/tests/by-util/test_nl.rs index fca73c37b..3ca039d19 100644 --- a/tests/by-util/test_nl.rs +++ b/tests/by-util/test_nl.rs @@ -23,8 +23,8 @@ fn test_padding_without_overflow() { .run() .stdout_is( "000001xL1\n001001xL2\n002001xL3\n003001xL4\n004001xL5\n005001xL6\n006001xL7\n0070\ - 01xL8\n008001xL9\n009001xL10\n010001xL11\n011001xL12\n012001xL13\n013001xL14\n014\ - 001xL15\n", + 01xL8\n008001xL9\n009001xL10\n010001xL11\n011001xL12\n012001xL13\n013001xL14\n014\ + 001xL15\n", ); } @@ -35,7 +35,7 @@ fn test_padding_with_overflow() { .run() .stdout_is( "0001xL1\n1001xL2\n2001xL3\n3001xL4\n4001xL5\n5001xL6\n6001xL7\n7001xL8\n8001xL9\n\ - 9001xL10\n10001xL11\n11001xL12\n12001xL13\n13001xL14\n14001xL15\n", + 9001xL10\n10001xL11\n11001xL12\n12001xL13\n13001xL14\n14001xL15\n", ); } @@ -45,15 +45,15 @@ fn test_sections_and_styles() { ( "section.txt", "\nHEADER1\nHEADER2\n\n1 |BODY1\n2 \ - |BODY2\n\nFOOTER1\nFOOTER2\n\nNEXTHEADER1\nNEXTHEADER2\n\n1 \ - |NEXTBODY1\n2 |NEXTBODY2\n\nNEXTFOOTER1\nNEXTFOOTER2\n", + |BODY2\n\nFOOTER1\nFOOTER2\n\nNEXTHEADER1\nNEXTHEADER2\n\n1 \ + |NEXTBODY1\n2 |NEXTBODY2\n\nNEXTFOOTER1\nNEXTFOOTER2\n", ), ( "joinblanklines.txt", "1 |Nonempty\n2 |Nonempty\n3 |Followed by 10x empty\n\n\n\n\n4 \ - |\n\n\n\n\n5 |\n6 |Followed by 5x empty\n\n\n\n\n7 |\n8 \ - |Followed by 4x empty\n\n\n\n\n9 |Nonempty\n10 |Nonempty\n11 \ - |Nonempty.\n", + |\n\n\n\n\n5 |\n6 |Followed by 5x empty\n\n\n\n\n7 |\n8 \ + |Followed by 4x empty\n\n\n\n\n9 |Nonempty\n10 |Nonempty\n11 \ + |Nonempty.\n", ), ] { new_ucmd!() diff --git a/tests/by-util/test_rm.rs b/tests/by-util/test_rm.rs index 27568957a..c3635d202 100644 --- a/tests/by-util/test_rm.rs +++ b/tests/by-util/test_rm.rs @@ -148,7 +148,7 @@ fn test_rm_errors() { // rm: error: could not remove directory 'test_rm_errors_directory' (did you mean to pass '-r'?) ucmd.arg(dir).fails().stderr_is( "rm: error: could not remove directory 'test_rm_errors_directory' (did you mean \ - to pass '-r' or '-R'?)\n", + to pass '-r' or '-R'?)\n", ); } diff --git a/tests/by-util/test_rmdir.rs b/tests/by-util/test_rmdir.rs index 5f87b5af6..34531cf22 100644 --- a/tests/by-util/test_rmdir.rs +++ b/tests/by-util/test_rmdir.rs @@ -40,7 +40,7 @@ fn test_rmdir_nonempty_directory_no_parents() { ucmd.arg(dir).fails().stderr_is( "rmdir: error: failed to remove 'test_rmdir_nonempty_no_parents': Directory not \ - empty\n", + empty\n", ); assert!(at.dir_exists(dir)); @@ -60,9 +60,9 @@ fn test_rmdir_nonempty_directory_with_parents() { ucmd.arg("-p").arg(dir).fails().stderr_is( "rmdir: error: failed to remove 'test_rmdir_nonempty/with/parents': Directory not \ - empty\nrmdir: error: failed to remove 'test_rmdir_nonempty/with': Directory not \ - empty\nrmdir: error: failed to remove 'test_rmdir_nonempty': Directory not \ - empty\n", + empty\nrmdir: error: failed to remove 'test_rmdir_nonempty/with': Directory not \ + empty\nrmdir: error: failed to remove 'test_rmdir_nonempty': Directory not \ + empty\n", ); assert!(at.dir_exists(dir)); diff --git a/tests/by-util/test_unlink.rs b/tests/by-util/test_unlink.rs index daac6d3b3..fa8f962c4 100644 --- a/tests/by-util/test_unlink.rs +++ b/tests/by-util/test_unlink.rs @@ -23,7 +23,7 @@ fn test_unlink_multiple_files() { ucmd.arg(file_a).arg(file_b).fails().stderr_is( "unlink: error: extra operand: 'test_unlink_multiple_file_b'\nTry 'unlink --help' \ - for more information.\n", + for more information.\n", ); } @@ -36,7 +36,7 @@ fn test_unlink_directory() { ucmd.arg(dir).fails().stderr_is( "unlink: error: cannot unlink 'test_unlink_empty_directory': Not a regular file \ - or symlink\n", + or symlink\n", ); } @@ -46,6 +46,6 @@ fn test_unlink_nonexistent() { new_ucmd!().arg(file).fails().stderr_is( "unlink: error: Cannot stat 'test_unlink_nonexistent': No such file or directory \ - (os error 2)\n", + (os error 2)\n", ); } diff --git a/tests/by-util/test_wc.rs b/tests/by-util/test_wc.rs index fc9c00ecc..b064d7e0e 100644 --- a/tests/by-util/test_wc.rs +++ b/tests/by-util/test_wc.rs @@ -81,6 +81,6 @@ fn test_multiple_default() { .run() .stdout_is( " 13 109 772 lorem_ipsum.txt\n 18 204 1115 moby_dick.txt\n 5 57 302 \ - alice_in_wonderland.txt\n 36 370 2189 total\n", + alice_in_wonderland.txt\n 36 370 2189 total\n", ); }