| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f764be2 commit 162ac93
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,12 +32,9 @@ test-async-context-frame: PASS, FLAKY | |||
| 32 | 32 | test-runner-run-watch: PASS, FLAKY | |
| 33 | 33 | # https://github.com/nodejs/node/pull/59408#issuecomment-3170650933 | |
| 34 | 34 | test-fs-cp-sync-error-on-exist: PASS, FLAKY | |
| 35 | - test-fs-cp-sync-copy-symlink-not-pointing-to-folder: PASS, FLAKY | ||
| 36 | 35 | test-fs-cp-sync-symlink-points-to-dest-error: PASS, FLAKY | |
| 37 | - test-fs-cp-sync-resolve-relative-symlinks-false: PASS, FLAKY | ||
| 38 | 36 | test-fs-cp-async-symlink-points-to-dest: PASS, FLAKY | |
| 39 | 37 | test-fs-cp-sync-unicode-folder-names: PASS, FLAKY | |
| 40 | - test-fs-cp-sync-resolve-relative-symlinks-default: PASS, FLAKY | ||
| 41 | 38 | ||
| 42 | 39 | # https://github.com/nodejs/node/issues/56751 | |
| 43 | 40 | test-without-async-context-frame: PASS, FLAKY | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | // This tests that cpSync copies link if it does not point to folder in src. | |
| 2 | - import { mustNotMutateObjectDeep } from '../common/index.mjs'; | ||
| 2 | + import { mustNotMutateObjectDeep, isWindows } from '../common/index.mjs'; | ||
| 3 | 3 | import { nextdir } from '../common/fs.js'; | |
| 4 | 4 | import assert from 'node:assert'; | |
| 5 | 5 | import { cpSync, mkdirSync, symlinkSync, readlinkSync } from 'node:fs'; | |
@@ -16,4 +16,11 @@ mkdirSync(join(dest, 'a'), mustNotMutateObjectDeep({ recursive: true })); | |||
| 16 | 16 | symlinkSync(dest, join(dest, 'a', 'c')); | |
| 17 | 17 | cpSync(src, dest, mustNotMutateObjectDeep({ recursive: true })); | |
| 18 | 18 | const link = readlinkSync(join(dest, 'a', 'c')); | |
| 19 | - assert.strictEqual(link, src); | ||
| 19 | + | ||
| 20 | + if (isWindows) { | ||
| 21 | + // On Windows, readlinkSync() may return a path with uppercase drive letter, | ||
| 22 | + // but paths are case-insensitive. | ||
| 23 | + assert.strictEqual(link.toLowerCase(), src.toLowerCase()); | ||
| 24 | + } else { | ||
| 25 | + assert.strictEqual(link, src); | ||
| 26 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | // This tests that cpSync resolves relative symlinks to their absolute path by default. | |
| 2 | - import { mustNotMutateObjectDeep } from '../common/index.mjs'; | ||
| 2 | + import { mustNotMutateObjectDeep, isWindows } from '../common/index.mjs'; | ||
| 3 | 3 | import { nextdir } from '../common/fs.js'; | |
| 4 | 4 | import assert from 'node:assert'; | |
| 5 | 5 | import { cpSync, mkdirSync, writeFileSync, symlinkSync, readlinkSync } from 'node:fs'; | |
@@ -18,4 +18,11 @@ mkdirSync(dest, mustNotMutateObjectDeep({ recursive: true })); | |||
| 18 | 18 | ||
| 19 | 19 | cpSync(src, dest, mustNotMutateObjectDeep({ recursive: true })); | |
| 20 | 20 | const link = readlinkSync(join(dest, 'bar.js')); | |
| 21 | - assert.strictEqual(link, join(src, 'foo.js')); | ||
| 21 | + | ||
| 22 | + if (isWindows) { | ||
| 23 | + // On Windows, readlinkSync() may return a path with uppercase drive letter, | ||
| 24 | + // but paths are case-insensitive. | ||
| 25 | + assert.strictEqual(link.toLowerCase(), join(src, 'foo.js').toLowerCase()); | ||
| 26 | + } else { | ||
| 27 | + assert.strictEqual(link, join(src, 'foo.js')); | ||
| 28 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | // This tests that cpSync resolves relative symlinks when verbatimSymlinks is false. | |
| 2 | - import { mustNotMutateObjectDeep } from '../common/index.mjs'; | ||
| 2 | + import { mustNotMutateObjectDeep, isWindows } from '../common/index.mjs'; | ||
| 3 | 3 | import { nextdir } from '../common/fs.js'; | |
| 4 | 4 | import assert from 'node:assert'; | |
| 5 | 5 | import { cpSync, mkdirSync, writeFileSync, symlinkSync, readlinkSync } from 'node:fs'; | |
@@ -18,4 +18,11 @@ mkdirSync(dest, mustNotMutateObjectDeep({ recursive: true })); | |||
| 18 | 18 | ||
| 19 | 19 | cpSync(src, dest, mustNotMutateObjectDeep({ recursive: true, verbatimSymlinks: false })); | |
| 20 | 20 | const link = readlinkSync(join(dest, 'bar.js')); | |
| 21 | - assert.strictEqual(link, join(src, 'foo.js')); | ||
| 21 | + | ||
| 22 | + if (isWindows) { | ||
| 23 | + // On Windows, readlinkSync() may return a path with uppercase drive letter, | ||
| 24 | + // but paths are case-insensitive. | ||
| 25 | + assert.strictEqual(link.toLowerCase(), join(src, 'foo.js').toLowerCase()); | ||
| 26 | + } else { | ||
| 27 | + assert.strictEqual(link, join(src, 'foo.js')); | ||
| 28 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments