From 95e321733edc0897b9e4700b51994c4c87b6f81f Mon Sep 17 00:00:00 2001 From: Kevin Cui Date: Thu, 28 Mar 2024 19:25:59 +0800 Subject: [PATCH] fix test --- test/filesystem-spec.js | 4 ++-- .../srcpath-include-symlink/private/var/app/symbol/link.txt | 1 - .../private/var/{app/real.txt => file.txt} | 0 test/input/srcpath-include-symlink/private/var/link/file.txt | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) delete mode 120000 test/input/srcpath-include-symlink/private/var/app/symbol/link.txt rename test/input/srcpath-include-symlink/private/var/{app/real.txt => file.txt} (100%) create mode 120000 test/input/srcpath-include-symlink/private/var/link/file.txt diff --git a/test/filesystem-spec.js b/test/filesystem-spec.js index 46da34a..fd86f24 100644 --- a/test/filesystem-spec.js +++ b/test/filesystem-spec.js @@ -7,10 +7,10 @@ const Filesystem = require('../lib/filesystem') describe('filesystem', function () { it('should does not throw error when src path include symbol link', async () => { - const src = path.join(__dirname, 'input', 'srcpath-include-symlink', 'var', 'app') + const src = path.join(__dirname, 'input', 'srcpath-include-symlink', 'var') const filesystem = new Filesystem(src) assert.doesNotThrow(() => { - filesystem.insertLink(path.join(src, 'symbol', 'link.txt')) + filesystem.insertLink(path.join(src, 'link', 'file.txt')) }) }) }) diff --git a/test/input/srcpath-include-symlink/private/var/app/symbol/link.txt b/test/input/srcpath-include-symlink/private/var/app/symbol/link.txt deleted file mode 120000 index 5099602..0000000 --- a/test/input/srcpath-include-symlink/private/var/app/symbol/link.txt +++ /dev/null @@ -1 +0,0 @@ -../real.txt \ No newline at end of file diff --git a/test/input/srcpath-include-symlink/private/var/app/real.txt b/test/input/srcpath-include-symlink/private/var/file.txt similarity index 100% rename from test/input/srcpath-include-symlink/private/var/app/real.txt rename to test/input/srcpath-include-symlink/private/var/file.txt diff --git a/test/input/srcpath-include-symlink/private/var/link/file.txt b/test/input/srcpath-include-symlink/private/var/link/file.txt new file mode 120000 index 0000000..1247f69 --- /dev/null +++ b/test/input/srcpath-include-symlink/private/var/link/file.txt @@ -0,0 +1 @@ +../file.txt \ No newline at end of file