From a8edf1aafe24f3f943f61061ab978db35ffb9c81 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 13 Mar 2021 11:50:52 -0800 Subject: [PATCH] test: add known_issues test for #13683 Add a known_issues test for a known Windows issue. Refs: https://github.com/nodejs/node/issues/13683 PR-URL: https://github.com/nodejs/node/pull/37744 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- test/known_issues/known_issues.status | 16 ++++++++++++++++ .../test-path-posix-relative-on-windows.js | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/known_issues/test-path-posix-relative-on-windows.js diff --git a/test/known_issues/known_issues.status b/test/known_issues/known_issues.status index e0f0a456089bf2..690e6e9840b77c 100644 --- a/test/known_issues/known_issues.status +++ b/test/known_issues/known_issues.status @@ -15,16 +15,32 @@ test-vm-timeout-escape-queuemicrotask: SKIP [$system==win32] [$system==linux] +# Windows-specific test +test-path-posix-relative-on-windows: SKIP [$system==macos] +# Windows-specific test +test-path-posix-relative-on-windows: SKIP [$system==solaris] +# Windows-specific test +test-path-posix-relative-on-windows: SKIP [$system==freebsd] +# Windows-specific test +test-path-posix-relative-on-windows: SKIP [$system==aix] +# Windows-specific test +test-path-posix-relative-on-windows: SKIP [$arch==arm] # The Raspberry Pis are too slow to run this test. # See https://github.com/nodejs/build/issues/2227#issuecomment-608334574 test-crypto-authenticated-stream: SKIP +# Windows-specific test +test-path-posix-relative-on-windows: SKIP + +[$system==ibmi] +# Windows-specific test +test-path-posix-relative-on-windows: SKIP diff --git a/test/known_issues/test-path-posix-relative-on-windows.js b/test/known_issues/test-path-posix-relative-on-windows.js new file mode 100644 index 00000000000000..bcaaca8b18a1ef --- /dev/null +++ b/test/known_issues/test-path-posix-relative-on-windows.js @@ -0,0 +1,10 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); +const path = require('path'); + +// Refs: https://github.com/nodejs/node/issues/13683 + +const relativePath = path.posix.relative('a/b/c', '../../x'); +assert.match(relativePath, /^(\.\.\/){3,5}x$/);