1 const Cc = Components.classes;
2 const Ci = Components.interfaces;
5 // skip this test on Windows
6 var isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
8 var testDir = __LOCATION__.parent;
9 // create a test file, then symlink it, then check that we think it's a symlink
10 var targetFile = testDir.clone();
11 targetFile.append("target.txt");
12 if (!targetFile.exists())
13 targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0644);
15 var link = testDir.clone();
20 var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
21 ln.initWithPath("/bin/ln");
22 var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
24 var args = ["-s", targetFile.path, link.path];
25 process.run(true, args, args.length);
26 do_check_true(link.isSymlink());