Skip to content

Commit 51fd53f

Browse files
committed
Bump bytesize to fix into filesize
Closes nushell#14866 Incorporates bytesize-rs/bytesize#59 with bytesize version 1.3.1 Added test with invalid input that was silently ignored before
1 parent 18e3a5d commit 51fd53f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bracoxide = "0.1.4"
7070
brotli = "7.0"
7171
byteorder = "1.5"
7272
bytes = "1"
73-
bytesize = "1.3"
73+
bytesize = "1.3.1"
7474
calamine = "0.26.1"
7575
chardetng = "0.1.17"
7676
chrono = { default-features = false, version = "0.4.34" }

crates/nu-command/tests/commands/into_filesize.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,10 @@ fn wrong_positive_str() {
128128

129129
assert!(actual.err.contains("can't convert string to filesize"));
130130
}
131+
132+
#[test]
133+
fn invalid_str() {
134+
let actual = nu!("'42.0 42.0 kB' | into filesize");
135+
136+
assert!(actual.err.contains("can't convert string to filesize"));
137+
}

0 commit comments

Comments
 (0)