mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 00:44:57 +02:00
Fix encode/decode todo's (#13683)
Mistakes have been made. I forgot about a bunch of `todo`s in the helper functions. So, this PR replaces them with proper errors. It also adds tests for parse-time evaluation, because one `todo` I missed was in a `run_const` function.
This commit is contained in:
@ -2,16 +2,14 @@ use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn canonical() {
|
||||
for value in super::random_bytes() {
|
||||
let outcome = nu!("{} | encode base32hex | decode base32hex | to nuon", value);
|
||||
assert_eq!(outcome.out, value);
|
||||
super::test_canonical("base32hex");
|
||||
super::test_canonical("base32hex --nopad");
|
||||
}
|
||||
|
||||
let outcome = nu!(
|
||||
"{} | encode base32hex --nopad | decode base32hex --nopad | to nuon",
|
||||
value
|
||||
);
|
||||
assert_eq!(outcome.out, value);
|
||||
}
|
||||
#[test]
|
||||
fn const_() {
|
||||
super::test_const("base32hex");
|
||||
super::test_const("base32hex --nopad");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user