Bug 1856942: part 5) Factor async loading of a sheet out of `Loader::LoadSheet`....
[gecko.git] / xpcom / tests / unit / test_bug476919.js
blob5ba64758c7cadfd9fbc4d96ae318ba451ed21050
1 /* global __LOCATION__ */
3 function run_test() {
4   var testDir = __LOCATION__.parent;
5   // create a test file, then symlink it, then check that we think it's a symlink
6   var targetFile = testDir.clone();
7   targetFile.append("target.txt");
8   if (!targetFile.exists()) {
9     targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
10   }
12   var link = testDir.clone();
13   link.append("link");
14   if (link.exists()) {
15     link.remove(false);
16   }
18   var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
19   ln.initWithPath("/bin/ln");
20   var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
21   process.init(ln);
22   var args = ["-s", targetFile.path, link.path];
23   process.run(true, args, args.length);
24   Assert.ok(link.isSymlink());