1
0
mirror of https://github.com/nushell/nushell.git synced 2025-04-14 08:18:17 +02:00
nushell/crates/nu-command/tests
Ian Manske 12effd9b4e
Refactor Value cell path functions to fix bugs ()
# Description
Slightly refactors the cell path functions (`insert_data_at_cell_path`,
etc.) for `Value` to fix a few bugs and ensure consistent behavior.
Namely, case (in)sensitivity now applies to lazy records just like it
does for regular `Records`. Also, the insert behavior of `insert` and
`upsert` now match, alongside fixing a few related bugs described below.
Otherwise, a few places were changed to use the `Record` API.

# Tests
Added tests for two bugs:
- `{a: {}} | insert a.b.c 0`: before this PR, doesn't create the
innermost record `c`.
- `{table: [[col]; [{a: 1}], [{a: 1}]]} | insert table.col.b 2`: before
this PR, doesn't add the field `b: 2` to each row.
2023-11-19 21:46:41 +01:00
..
commands Refactor Value cell path functions to fix bugs () 2023-11-19 21:46:41 +01:00
format_conversions bump rust-toolchain to 1.72.1 () 2023-11-16 15:14:45 -06:00
main.rs Rename misused "deprecation" to removal () 2023-08-15 07:17:31 +12:00