mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #1838 from sylvestre/polish
Update cargo.lock + rustfmt some new tests
This commit is contained in:
commit
cb6871d2a0
8 changed files with 41 additions and 39 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -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"
|
||||
|
|
|
@ -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-?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-?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",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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!()
|
||||
|
|
|
@ -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",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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",
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue