nushell/crates/nu-std/tests
Bram Geron 86f12ffe61
Fix bug in std dirs drop; improve documentation (#9449)
# Description

When the directory stack contains only two directories, then std dirs
drop
used to misbehave and (essentially) drop the other directory, instead of
dropping the current directory.

This is fixed by always cd'ing for std dirs drop.

Before:

    /tmp〉enter ..
    /〉dexit
    /〉

After:

    /tmp〉enter ..
    /〉dexit
    /tmp〉


Additionally, I propose to explain the relevant environment variables a
bit
more thoroughly.


# User-Facing Changes

- Fix bug in dexit (std dirs drop) when two directories are remaining

# Tests + Formatting

Added a regression test. Made the existing test easier to understand.
2023-06-16 10:42:50 +02:00
..
logger_tests std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
test_asserts.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
test_dirs.nu Fix bug in std dirs drop; improve documentation (#9449) 2023-06-16 10:42:50 +02:00
test_iter.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
test_setup_teardown.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
test_std.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00
test_xml.nu std: refactor test-runner to no longer require tests to be exported (#9355) 2023-06-10 20:16:17 +02:00