nushell/crates/nu-std/tests
Bob Hyman ec3e4ce120
dirs goto: update current ring slot before leaving it. (#10706)
Fixes #10696

# Description

As reported, you could mess up the ring of remembered directories in
`std dirs` (a.k.a the `shells` commands) with a sequence like this:
```
~/test> mkdir b c

~/test> pushd b
~/test/b> cd ../c
~/test/c> goto 0
~/test> goto 1
## expect to end up in ~/test/c
## observe you're in ~/test/b
~/test/b>
```
Problem was `dirs goto` was not updating the remembered directories
before leaving the current slot for some other. This matters if the user
did a manual `cd` (which cannot update the remembered directories ring)

# User-Facing Changes
None! it just works ™️

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-10-13 06:46:51 -05:00
..
logger_tests remove underline from std NU_LOG_FORMAT (#10604) 2023-10-04 13:30:49 -05:00
test_asserts.nu Rename into decimal to into float (#9979) 2023-09-12 13:02:47 +02:00
test_dirs.nu dirs goto: update current ring slot before leaving it. (#10706) 2023-10-13 06:46:51 -05:00
test_dt.nu std dt datetime-diff: fix uninitialized field ref when borrowing (#10466) 2023-09-24 10:53:56 +02:00
test_formats.nu add to ndjson and to jsonl to the standard library (#10519) 2023-10-02 11:50:07 +02:00
test_iter.nu Implement annotations support in test runner (#9406) 2023-07-02 10:41:33 +02:00
test_setup_teardown.nu Implement annotations support in test runner (#9406) 2023-07-02 10:41:33 +02:00
test_std.nu add std repeat command to replace "foo" * 3 (#10339) 2023-09-12 21:59:31 +02:00
test_xml.nu Implement annotations support in test runner (#9406) 2023-07-02 10:41:33 +02:00