@@ -7,8 +7,8 @@ const assert = require('assert'); |
7 | 7 | const path = require('path'); |
8 | 8 |
|
9 | 9 | { |
10 | | - const tmpPath = path.resolve('/tmp/'); |
11 | | - const otherPath = path.resolve('/other-path/'); |
| 10 | + const tmpPath = path.resolve('./tmp/'); |
| 11 | + const otherPath = path.resolve('./other-path/'); |
12 | 12 | const { status, stdout } = spawnSync( |
13 | 13 | process.execPath, |
14 | 14 | [ |
@@ -17,8 +17,8 @@ const path = require('path'); |
17 | 17 | `console.log(process.permission.has("fs")); |
18 | 18 | console.log(process.permission.has("fs.read")); |
19 | 19 | console.log(process.permission.has("fs.write")); |
20 | | - console.log(process.permission.has("fs.write", "/tmp/")); |
21 | | - console.log(process.permission.has("fs.write", "/other-path/"));`, |
| 20 | + console.log(process.permission.has("fs.write", "./tmp/")); |
| 21 | + console.log(process.permission.has("fs.write", "./other-path/"));`, |
22 | 22 | ] |
23 | 23 | ); |
24 | 24 | const [fs, fsIn, fsOut, fsOutAllowed1, fsOutAllowed2] = stdout.toString().split('\n'); |
@@ -31,8 +31,8 @@ const path = require('path'); |
31 | 31 | } |
32 | 32 |
|
33 | 33 | { |
34 | | - const tmpPath = path.resolve('/tmp/'); |
35 | | - const pathWithComma = path.resolve('/other,path/'); |
| 34 | + const tmpPath = path.resolve('./tmp/'); |
| 35 | + const pathWithComma = path.resolve('./other,path/'); |
36 | 36 | const { status, stdout } = spawnSync( |
37 | 37 | process.execPath, |
38 | 38 | [ |
@@ -45,8 +45,8 @@ const path = require('path'); |
45 | 45 | `console.log(process.permission.has("fs")); |
46 | 46 | console.log(process.permission.has("fs.read")); |
47 | 47 | console.log(process.permission.has("fs.write")); |
48 | | - console.log(process.permission.has("fs.write", "/tmp/")); |
49 | | - console.log(process.permission.has("fs.write", "/other,path/"));`, |
| 48 | + console.log(process.permission.has("fs.write", "./tmp/")); |
| 49 | + console.log(process.permission.has("fs.write", "./other,path/"));`, |
50 | 50 | ] |
51 | 51 | ); |
52 | 52 | const [fs, fsIn, fsOut, fsOutAllowed1, fsOutAllowed2] = stdout.toString().split('\n'); |
@@ -59,7 +59,7 @@ const path = require('path'); |
59 | 59 | } |
60 | 60 |
|
61 | 61 | { |
62 | | - const filePath = path.resolve('/tmp/file,with,comma.txt'); |
| 62 | + const filePath = path.resolve('./tmp/file,with,comma.txt'); |
63 | 63 | const { status, stdout, stderr } = spawnSync( |
64 | 64 | process.execPath, |
65 | 65 | [ |
@@ -70,7 +70,7 @@ const path = require('path'); |
70 | 70 | `console.log(process.permission.has("fs")); |
71 | 71 | console.log(process.permission.has("fs.read")); |
72 | 72 | console.log(process.permission.has("fs.write")); |
73 | | - console.log(process.permission.has("fs.write", "/tmp/file,with,comma.txt"));`, |
| 73 | + console.log(process.permission.has("fs.write", "./tmp/file,with,comma.txt"));`, |
74 | 74 | ] |
75 | 75 | ); |
76 | 76 | const [fs, fsIn, fsOut, fsOutAllowed] = stdout.toString().split('\n'); |
|