test/script/basic/fileline.js

changeset 136
c54e218333be
parent 7
5a1b0714df0e
child 952
6d5471a497fb
child 962
ac62e33a99b0
equal deleted inserted replaced
133:5759f600fcf7 136:c54e218333be
39 39
40 // loaded file should see it's name in __FILE__ 40 // loaded file should see it's name in __FILE__
41 load(__DIR__ + "loadedfile.js"); 41 load(__DIR__ + "loadedfile.js");
42 42
43 // Add check for base part of a URL. We can't test __DIR__ inside 43 // Add check for base part of a URL. We can't test __DIR__ inside
44 // a script that is downloaded from a URL. check for Source.baseURL 44 // a script that is downloaded from a URL. check for SourceHelper.baseURL
45 // which is exposed as __DIR__ for URL case. 45 // which is exposed as __DIR__ for URL case.
46 46
47 var url = new java.net.URL("http://www.acme.com:8080/foo/bar.js"); 47 var url = new java.net.URL("http://www.acme.com:8080/foo/bar.js");
48 print(Packages.jdk.nashorn.internal.runtime.Source.baseURL(url)); 48 print(Packages.jdk.nashorn.test.models.SourceHelper.baseURL(url));

mercurial