mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-07-18 12:58:21 +08:00
The cycle scenarios all pass with the old grep-based detection too; the bug the `case`-based detection actually fixes is resolved names interpolated into the grep pattern as regexes, where resolving axb -> a.b falsely reported ∞ because the pattern `a.b` matches the seen name `axb`. Pin both directions: the fixed false positive, and a genuine cycle through a metachar name. Also correct the space-name scenario comment (the old anchored grep passed that scenario; only token-delimited seen-storage would not), and register every new fixture name in the suite teardown, so a mid-test failure can not leak aliases into later tests.
25 lines
876 B
Bash
Executable File
25 lines
876 B
Bash
Executable File
#!/bin/sh
|
|
|
|
for i in $(seq 1 10)
|
|
do
|
|
rm -f "../../../alias/test-stable-$i"
|
|
rm -rf "../../../v0.0.$i"
|
|
rm -f "../../../alias/test-unstable-$i"
|
|
rm -rf "../../../v0.1.$i"
|
|
rm -rf "../../../alias/test-iojs-$i"
|
|
rm -rf "../../../versions/io.js/v0.2.$i"
|
|
done
|
|
|
|
rm -f "../../../alias/stable"
|
|
rm -f "../../../alias/unstable"
|
|
rm -f "../../../alias/node"
|
|
rm -f "../../../alias/iojs"
|
|
rm -f "../../../alias/default"
|
|
rm -f "../../../alias/test-blank-lines"
|
|
rm -f "../../../alias/test-multi-lines"
|
|
rm -f "../../../alias/test-edge-"* "../../../alias/test edge spaces"
|
|
rm -f "../../../alias/self" "../../../alias/link1" "../../../alias/link2" "../../../alias/link3"
|
|
rm -f "../../../alias/foo bar" "../../../alias/midway" "../../../alias/bar"
|
|
rm -f "../../../alias/hop1" "../../../alias/hop2" "../../../alias/hop3" "../../../alias/hop4"
|
|
rm -f "../../../alias/axb" "../../../alias/a.b"
|