Add Test Case for Special Character Paths (#3596)

Added test cases that ensure that special characters in path names are passed
to external commands correctly. These cases have been implemented with rstest
to reuse existing test code.
This commit is contained in:
Marc Schreiber 2021-06-28 12:16:03 +02:00 committed by GitHub
parent 989062d2f8
commit 7cb9fddc11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 152 additions and 118 deletions

245
Cargo.lock generated
View file

@ -14,9 +14,9 @@ dependencies = [
[[package]]
name = "addr2line"
version = "0.15.1"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"
checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
dependencies = [
"gimli",
]
@ -160,9 +160,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.40"
version = "1.0.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b"
checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61"
[[package]]
name = "arboard"
@ -327,7 +327,7 @@ checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -371,7 +371,7 @@ checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -652,9 +652,9 @@ dependencies = [
[[package]]
name = "bytemuck"
version = "1.5.1"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bed57e2090563b83ba8f83366628ce535a7584c9afa4c9fc0612a03925c6df58"
checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435"
[[package]]
name = "byteorder"
@ -686,9 +686,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
[[package]]
name = "bzip2"
version = "0.3.3"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b"
checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0"
dependencies = [
"bzip2-sys",
"libc",
@ -696,9 +696,9 @@ dependencies = [
[[package]]
name = "bzip2-sys"
version = "0.1.10+1.0.8"
version = "0.1.11+1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c"
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
dependencies = [
"cc",
"libc",
@ -955,9 +955,9 @@ dependencies = [
"hkdf",
"hmac 0.10.1",
"percent-encoding 2.1.0",
"rand 0.8.3",
"rand 0.8.4",
"sha2 0.9.5",
"time 0.2.26",
"time 0.2.27",
"version_check",
]
@ -1115,7 +1115,7 @@ dependencies = [
"crossterm_winapi 0.6.2",
"lazy_static 1.4.0",
"libc",
"mio 0.7.11",
"mio 0.7.13",
"parking_lot 0.11.1",
"signal-hook",
"winapi 0.3.9",
@ -1131,7 +1131,7 @@ dependencies = [
"crossterm_winapi 0.7.0",
"lazy_static 1.4.0",
"libc",
"mio 0.7.11",
"mio 0.7.13",
"parking_lot 0.11.1",
"signal-hook",
"winapi 0.3.9",
@ -1189,7 +1189,7 @@ dependencies = [
"proc-macro2",
"quote 1.0.9",
"smallvec 1.6.1",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -1199,7 +1199,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e"
dependencies = [
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -1241,7 +1241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e98e2ad1a782e33928b96fc3948e7c355e5af34ba4de7670fe8bac2a3b2006d"
dependencies = [
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -1355,7 +1355,7 @@ checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -1378,7 +1378,7 @@ dependencies = [
"convert_case",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -1503,9 +1503,9 @@ dependencies = [
[[package]]
name = "dunce"
version = "1.0.1"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2641c4a7c0c4101df53ea572bffdc561c146f6c2eb09e4df02bc4811e3feeb4"
checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541"
[[package]]
name = "dyn-clone"
@ -1679,7 +1679,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
"synstructure",
]
@ -1943,7 +1943,7 @@ dependencies = [
"proc-macro-hack",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -2093,7 +2093,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -2131,7 +2131,7 @@ dependencies = [
"proc-macro-hack",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -2161,9 +2161,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "globset"
version = "0.4.6"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a"
checksum = "f0fc1b9fa0e64ffb1aa5b95daa0f0f167734fd528b7c02eabc581d9d843649b1"
dependencies = [
"aho-corasick 0.7.18",
"bstr",
@ -2342,7 +2342,7 @@ dependencies = [
"markup5ever",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -2601,9 +2601,9 @@ dependencies = [
[[package]]
name = "ipnet"
version = "2.3.0"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9"
[[package]]
name = "is_executable"
@ -2639,9 +2639,9 @@ dependencies = [
[[package]]
name = "itertools"
version = "0.10.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319"
checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
dependencies = [
"either",
]
@ -2744,9 +2744,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.95"
version = "0.2.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36"
checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
[[package]]
name = "libgit2-sys"
@ -3055,9 +3055,9 @@ dependencies = [
[[package]]
name = "mio"
version = "0.7.11"
version = "0.7.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956"
checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16"
dependencies = [
"libc",
"log 0.4.14",
@ -3129,7 +3129,7 @@ checksum = "a8a3e2bde382ebf960c1f3e79689fa5941625fe9bf694a1cb64af3e85faff3af"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -3288,6 +3288,7 @@ dependencies = [
"nu_plugin_to_sqlite",
"nu_plugin_tree",
"nu_plugin_xpath",
"rstest",
"serial_test",
]
@ -3368,7 +3369,7 @@ dependencies = [
"quick-xml 0.21.0",
"quickcheck",
"quickcheck_macros",
"rand 0.8.3",
"rand 0.8.4",
"rayon",
"regex 1.5.4",
"roxmltree",
@ -3693,7 +3694,7 @@ version = "0.33.1"
dependencies = [
"heapless",
"nu-ansi-term",
"rand 0.8.3",
"rand 0.8.4",
]
[[package]]
@ -4267,24 +4268,24 @@ dependencies = [
[[package]]
name = "object"
version = "0.25.1"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9023c1c0973b327f073c7f2fceb9bcc049862f93a7d14c6feb46c8a56460a0d5"
checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
version = "1.7.2"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
[[package]]
name = "onig"
version = "6.1.1"
version = "6.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b46fd9edbc018f0be4e366c24c46db44fac49cd01c039ae85308088b089dd5"
checksum = "b16fd3c0e73b516af509c13c4ba76ec0c987ce20d78b38cff356b8d01fc6a6c0"
dependencies = [
"bitflags",
"lazy_static 1.4.0",
@ -4294,9 +4295,9 @@ dependencies = [
[[package]]
name = "onig_sys"
version = "69.6.0"
version = "69.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed063c96cf4c0f2e5d09324409d158b38a0a85a7b90fbd68c8cad75c495d5775"
checksum = "9fd9442a09e4fbd08d196ddf419b2c79a43c3a46c800320cc841d45c2449a240"
dependencies = [
"cc",
"pkg-config",
@ -4380,7 +4381,7 @@ checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
dependencies = [
"lock_api 0.3.4",
"parking_lot_core 0.6.2",
"rustc_version",
"rustc_version 0.2.3",
]
[[package]]
@ -4404,7 +4405,7 @@ dependencies = [
"cloudabi",
"libc",
"redox_syscall 0.1.57",
"rustc_version",
"rustc_version 0.2.3",
"smallvec 0.6.14",
"winapi 0.3.9",
]
@ -4418,7 +4419,7 @@ dependencies = [
"cfg-if 1.0.0",
"instant",
"libc",
"redox_syscall 0.2.8",
"redox_syscall 0.2.9",
"smallvec 1.6.1",
"winapi 0.3.9",
]
@ -4549,7 +4550,7 @@ dependencies = [
"proc-macro-hack",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -4587,7 +4588,7 @@ checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -4598,7 +4599,7 @@ checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -4747,14 +4748,14 @@ dependencies = [
[[package]]
name = "polling"
version = "2.0.3"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fc12d774e799ee9ebae13f4076ca003b40d18a11ac0f3641e6f899618580b7b"
checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25"
dependencies = [
"cfg-if 1.0.0",
"libc",
"log 0.4.14",
"wepoll-sys",
"wepoll-ffi",
"winapi 0.3.9",
]
@ -4823,7 +4824,7 @@ dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
"version_check",
]
@ -4926,7 +4927,7 @@ checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"
dependencies = [
"env_logger 0.8.4",
"log 0.4.14",
"rand 0.8.3",
"rand 0.8.4",
]
[[package]]
@ -4937,7 +4938,7 @@ checksum = "b22a693222d716a9587786f37ac3f6b4faedb5b80c23914e7303ff5a1d8016e9"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -5004,14 +5005,14 @@ dependencies = [
[[package]]
name = "rand"
version = "0.8.3"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
dependencies = [
"libc",
"rand_chacha 0.3.0",
"rand_core 0.6.2",
"rand_hc 0.3.0",
"rand_chacha 0.3.1",
"rand_core 0.6.3",
"rand_hc 0.3.1",
]
[[package]]
@ -5026,12 +5027,12 @@ dependencies = [
[[package]]
name = "rand_chacha"
version = "0.3.0"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core 0.6.2",
"rand_core 0.6.3",
]
[[package]]
@ -5060,9 +5061,9 @@ dependencies = [
[[package]]
name = "rand_core"
version = "0.6.2"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
"getrandom 0.2.3",
]
@ -5088,11 +5089,11 @@ dependencies = [
[[package]]
name = "rand_hc"
version = "0.3.0"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
dependencies = [
"rand_core 0.6.2",
"rand_core 0.6.3",
]
[[package]]
@ -5164,9 +5165,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_syscall"
version = "0.2.8"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
dependencies = [
"bitflags",
]
@ -5189,7 +5190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
"getrandom 0.2.3",
"redox_syscall 0.2.8",
"redox_syscall 0.2.9",
]
[[package]]
@ -5305,6 +5306,19 @@ dependencies = [
"xmlparser",
]
[[package]]
name = "rstest"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "041bb0202c14f6a158bbbf086afb03d0c6e975c2dec7d4912f8061ed44f290af"
dependencies = [
"cfg-if 1.0.0",
"proc-macro2",
"quote 1.0.9",
"rustc_version 0.3.3",
"syn 1.0.73",
]
[[package]]
name = "rusqlite"
version = "0.25.3"
@ -5365,7 +5379,7 @@ dependencies = [
"proc-macro2",
"quote 1.0.9",
"rust-embed-utils",
"syn 1.0.72",
"syn 1.0.73",
"walkdir",
]
@ -5417,6 +5431,15 @@ dependencies = [
"semver 0.9.0",
]
[[package]]
name = "rustc_version"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
dependencies = [
"semver 0.11.0",
]
[[package]]
name = "rustversion"
version = "1.0.5"
@ -5533,9 +5556,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "security-framework"
version = "2.2.0"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84"
checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467"
dependencies = [
"bitflags",
"core-foundation",
@ -5546,9 +5569,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
version = "2.2.0"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339"
checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284"
dependencies = [
"core-foundation-sys",
"libc",
@ -5662,7 +5685,7 @@ checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -5761,7 +5784,7 @@ checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -5841,7 +5864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729"
dependencies = [
"libc",
"mio 0.7.11",
"mio 0.7.13",
"signal-hook-registry",
]
@ -5912,7 +5935,7 @@ checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -5985,7 +6008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5"
dependencies = [
"discard",
"rustc_version",
"rustc_version 0.2.3",
"stdweb-derive",
"stdweb-internal-macros",
"stdweb-internal-runtime",
@ -6002,7 +6025,7 @@ dependencies = [
"quote 1.0.9",
"serde 1.0.126",
"serde_derive",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -6018,7 +6041,7 @@ dependencies = [
"serde_derive",
"serde_json",
"sha1 0.6.0",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -6135,9 +6158,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.72"
version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
dependencies = [
"proc-macro2",
"quote 1.0.9",
@ -6161,7 +6184,7 @@ checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
"unicode-xid 0.2.2",
]
@ -6257,8 +6280,8 @@ checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
dependencies = [
"cfg-if 1.0.0",
"libc",
"rand 0.8.3",
"redox_syscall 0.2.8",
"rand 0.8.4",
"redox_syscall 0.2.9",
"remove_dir_all",
"winapi 0.3.9",
]
@ -6358,7 +6381,7 @@ checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -6416,9 +6439,9 @@ dependencies = [
[[package]]
name = "time"
version = "0.2.26"
version = "0.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08a8cbfbf47955132d0202d1662f49b2423ae35862aee471f3ba4b133358f372"
checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242"
dependencies = [
"const_fn",
"libc",
@ -6441,15 +6464,15 @@ dependencies = [
[[package]]
name = "time-macros-impl"
version = "0.1.1"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa"
checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f"
dependencies = [
"proc-macro-hack",
"proc-macro2",
"quote 1.0.9",
"standback",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -6609,7 +6632,7 @@ checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -6804,7 +6827,7 @@ checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
]
[[package]]
@ -7041,9 +7064,9 @@ dependencies = [
[[package]]
name = "vcpkg"
version = "0.2.13"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa"
checksum = "70455df2fdf4e9bf580a92e443f1eb0303c390d682e2ea817312c9e81f8c3399"
[[package]]
name = "vec_map"
@ -7145,7 +7168,7 @@ dependencies = [
"log 0.4.14",
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
"wasm-bindgen-shared",
]
@ -7179,7 +7202,7 @@ checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97"
dependencies = [
"proc-macro2",
"quote 1.0.9",
"syn 1.0.72",
"syn 1.0.73",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -7218,10 +7241,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e"
[[package]]
name = "wepoll-sys"
version = "3.0.1"
name = "wepoll-ffi"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff"
checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
dependencies = [
"cc",
]
@ -7367,9 +7390,9 @@ dependencies = [
[[package]]
name = "zip"
version = "0.5.12"
version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c83dc9b784d252127720168abd71ea82bf8c3d96b17dc565b5e2a02854f2b27"
checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815"
dependencies = [
"byteorder",
"bzip2",

View file

@ -61,7 +61,7 @@ nu-test-support = { version="0.33.1", path="./crates/nu-test-support" }
dunce = "1.0.1"
serial_test = "0.5.1"
hamcrest2 = "0.3.0"
rstest = "0.10.0"
[build-dependencies]

View file

@ -231,11 +231,22 @@ mod external_words {
assert_eq!(actual.out, "test \"things\"");
}
#[test]
fn external_arg_with_quotes() {
#[rstest::rstest]
#[case("sample.toml", r#""sample.toml""#)]
#[case("a sample file.toml", r#""a sample file.toml""#)]
#[case("quote'mark.toml", r#""quote'mark.toml""#)]
#[cfg_attr(
not(target_os = "windows"),
case(r#"quote"mark.toml"#, r#"$"quote(char double_quote)mark.toml""#)
)]
#[cfg_attr(not(target_os = "windows"), case("?mark.toml", r#""?mark.toml""#))]
#[cfg_attr(not(target_os = "windows"), case("*.toml", r#""*.toml""#))]
#[cfg_attr(not(target_os = "windows"), case("*.toml", "*.toml"))]
#[case("$ sign.toml", r#""$ sign.toml""#)]
fn external_arg_with_special_characters(#[case] path: &str, #[case] nu_path_argument: &str) {
Playground::setup("external_arg_with_quotes", |dirs, sandbox| {
sandbox.with_files(vec![FileWithContent(
"sample.toml",
path,
r#"
nu_party_venue = "zion"
"#,
@ -243,9 +254,9 @@ mod external_words {
let actual = nu!(
cwd: dirs.test(), pipeline(
r#"
nu --testbin meow "sample.toml" | from toml | get nu_party_venue
"#
&format!(r#"
nu --testbin meow {} | from toml | get nu_party_venue
"#, nu_path_argument)
));
assert_eq!(actual.out, "zion");