mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-17 13:32:18 +00:00
test(clv2): run the other-case WindowsApps check only on case-insensitive filesystems
test -ef compares directories on disk, so a lowercase spelling of the current user's WindowsApps only names the same directory where the filesystem ignores case (Windows, default macOS). On Linux it is a different directory, so the case is skipped there.
This commit is contained in:
1 parent
3636f993da
commit
697c1d0e71
1 file changed
+8
-2
@@ -159,9 +159,15 @@ test('runs the Python\\bin launcher for a WindowsApps python alias when python3
|
||||
assert.deepStrictEqual(run(dirs, [dirs.alias]).map(c => c[0]), ['launcher']);
|
||||
}));
|
||||
|
||||
test('matches the current user\'s WindowsApps directory case-insensitively', () => withTree(dirs => {
|
||||
// Windows and macOS filesystems ignore case, so a lowercase PATH entry names
|
||||
// the same WindowsApps directory there. On a case-sensitive filesystem it
|
||||
// would be another directory, so the case only runs where case is ignored.
|
||||
test('matches the current user\'s WindowsApps directory spelled in another case', () => withTree(dirs => {
|
||||
const lower = path.join(dirs.local, 'microsoft', 'windowsapps');
|
||||
fs.mkdirSync(lower, { recursive: true });
|
||||
if (!fs.existsSync(lower)) {
|
||||
console.log(' (skipped: temp filesystem is case-sensitive)');
|
||||
return;
|
||||
}
|
||||
writePython(lower, 'python3', 'alias');
|
||||
writePython(dirs.launcher, 'python3.exe', 'launcher');
|
||||
assert.deepStrictEqual(run(dirs, [lower]).map(c => c[0]), ['launcher']);
|
||||
|
||||
Reference in new issue
Block a user