Skip to content

Commit

Permalink
make sure simple values and lists do not transpose
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Sep 9, 2023
1 parent 3c1ae3a commit 700ffef
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/nu/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,5 +575,18 @@ mod tests {
default_value_repr(&table),
default_value_repr(&result)
);

assert_eq!(
transpose(&Value::test_string("foo")),
Value::test_string("foo")
);

assert_eq!(
transpose(&Value::test_list(vec![
Value::test_int(1),
Value::test_int(2)
])),
Value::test_list(vec![Value::test_int(1), Value::test_int(2)])
);
}
}

0 comments on commit 700ffef

Please sign in to comment.