[Tests] `nvm_ls handles hash in pattern`: fix cleanup, isolate NVM_DIR, cover the sed path
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- `cleanup` unset TEST_DIR before `rm -rf "${TEST_DIR-}"`, so the temp dir (with an executable fake `node`) was never removed, and urchin executes any executable file it finds under the test dir on the next local run. - the preexisting `foo#bar` assertions ran against the ambient NVM_DIR; now that `#` patterns comment-strip to `foo`, a real local alias named `foo` would resolve and break them, so all assertions now run against an isolated NVM_DIR. - the multiline content used a full x.y.z version, which takes nvm_ls's explicit-version fast path and never reaches the find/sed pipeline where the newline actually broke sed; a partial version exercises that path, and matching on "unterminated" covers both the BSD and GNU sed error wordings.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+26 added−10 removed
- tests:+26 added−10 removed