Bump rustyline and add unalias test (#3935)

This commit is contained in:
JT 2021-08-18 05:55:34 +12:00 committed by GitHub
parent 9bd408449e
commit ead4029d49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 11 deletions

32
Cargo.lock generated
View file

@ -1148,7 +1148,7 @@ version = "3.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "232295399409a8b7ae41276757b5a1cc21032848d42bff2352261f958b3ca29a"
dependencies = [
"nix",
"nix 0.20.0",
"winapi 0.3.9",
]
@ -1626,10 +1626,11 @@ dependencies = [
[[package]]
name = "fd-lock"
version = "2.0.0"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0010f02effd88c702318c5dde0463206be67495d0b4d906ba7c0a8f166cc7f06"
checksum = "b8806dd91a06a7a403a8e596f9bfbfb34e469efbc363fc9c9713e79e26472e36"
dependencies = [
"cfg-if 1.0.0",
"libc",
"winapi 0.3.9",
]
@ -2681,9 +2682,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.97"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765"
[[package]]
name = "libgit2-sys"
@ -3113,6 +3114,19 @@ dependencies = [
"libc",
]
[[package]]
name = "nix"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7555d6c7164cc913be1ce7f95cbecdabda61eb2ccd89008524af306fb7f5031"
dependencies = [
"bitflags",
"cc",
"cfg-if 1.0.0",
"libc",
"memoffset",
]
[[package]]
name = "nodrop"
version = "0.1.14"
@ -5219,9 +5233,9 @@ checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"
[[package]]
name = "rustyline"
version = "8.2.0"
version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbd4eaf7a7738f76c98e4f0395253ae853be3eb018f7b0bb57fe1b6c17e31874"
checksum = "790487c3881a63489ae77126f57048b42d62d3b2bafbf37453ea19eedb6340d6"
dependencies = [
"bitflags",
"cfg-if 1.0.0",
@ -5231,7 +5245,7 @@ dependencies = [
"libc",
"log",
"memchr",
"nix",
"nix 0.22.1",
"radix_trie",
"scopeguard",
"smallvec",
@ -6887,7 +6901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ffb080b3f2f616242a4eb8e7d325035312127901025b0052bc3154a282d0f19"
dependencies = [
"gethostname",
"nix",
"nix 0.20.0",
"winapi 0.3.9",
"winapi-wsapoll",
]

View file

@ -26,7 +26,7 @@ indexmap ="1.6.1"
log = "0.4.14"
pretty_env_logger = "0.4.0"
strip-ansi-escapes = "0.1.0"
rustyline = { version="8.1.0", optional=true }
rustyline = { version="9.0.0", optional=true }
ctrlc = { version="3.1.7", optional=true }
shadow-rs = { version="0.6", default-features=false, optional=true }
serde = { version="1.0.123", features=["derive"] }

View file

@ -74,7 +74,7 @@ rayon = "1.5.0"
regex = "1.4.3"
roxmltree = "0.14.0"
rust-embed = "5.9.0"
rustyline = { version="8.1.0", optional=true }
rustyline = { version="9.0.0", optional=true }
serde = { version="1.0.123", features=["derive"] }
serde_bytes = "0.11.5"
serde_ini = "0.2.0"

View file

@ -1160,6 +1160,19 @@ fn unalias_shadowing() {
assert_eq!(actual.out, "");
}
#[test]
fn unalias_hides_alias() {
let actual = nu!(cwd: ".", pipeline(
r#"alias ll = ls -l
ll
unalias ll
ll
"#)
);
assert!(actual.err.contains("not found"));
}
mod parse {
use nu_test_support::nu;