Add basic support for md5 hashing strings and binary data (#3197)

This commit is contained in:
Ryan Blecher
2021-03-20 14:48:53 -04:00
committed by GitHub
parent 0c7bcae9b1
commit a5cdd22bfe
7 changed files with 158 additions and 1 deletions

View File

@ -83,3 +83,16 @@ fn error_use_both_flags() {
.err
.contains("only one of --decode and --encode flags can be used"));
}
#[test]
fn md5_works_with_file() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample.db | hash md5
"#
)
);
assert_eq!(actual.out, "4de97601d232c427977ef11db396c951");
}