Don't replace points with slashes in the arguments

This commit is contained in:
Marco Castelluccio 2015-01-13 00:29:12 +01:00
Родитель b9755031ee
Коммит cb63d2232b
6 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -40,7 +40,7 @@ var urlParams = (function() {
params[param[0]] = param[1]; params[param[0]] = param[1];
}); });
params.args = (params.args || "").replace(".", "/", "g").split(","); params.args = (params.args || "").split(",");
return params; return params;
})(); })();

Просмотреть файл

@ -3,6 +3,6 @@ MIDlet-Jar-Size: 2436
MIDlet-Jar-URL: tests.jar MIDlet-Jar-URL: tests.jar
MIDlet-Name: AMIDlet MIDlet-Name: AMIDlet
MIDlet-Vendor: MIDlet Suite Vendor MIDlet-Vendor: MIDlet Suite Vendor
MIDlet-Version: 1 MIDlet-Version: 1.0.0
MicroEdition-Configuration: CLDC-1.0 MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.1 MicroEdition-Profile: MIDP-2.1

Просмотреть файл

@ -3,6 +3,6 @@ MIDlet-Jar-Size: 2436
MIDlet-Jar-URL: tests.jar MIDlet-Jar-URL: tests.jar
MIDlet-Name: AMIDlet MIDlet-Name: AMIDlet
MIDlet-Vendor: MIDlet Suite Vendor MIDlet-Vendor: MIDlet Suite Vendor
MIDlet-Version: 3 MIDlet-Version: 3.0.0
MicroEdition-Configuration: CLDC-1.0 MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.1 MicroEdition-Profile: MIDP-2.1

Просмотреть файл

@ -3,6 +3,6 @@ MIDlet-Jar-Size: 2436
MIDlet-Jar-URL: http://localhost:8000/tests/tests.jar MIDlet-Jar-URL: http://localhost:8000/tests/tests.jar
MIDlet-Name: AMIDlet MIDlet-Name: AMIDlet
MIDlet-Vendor: MIDlet Suite Vendor MIDlet-Vendor: MIDlet Suite Vendor
MIDlet-Version: 2 MIDlet-Version: 2.0.0
MicroEdition-Configuration: CLDC-1.0 MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.1 MicroEdition-Profile: MIDP-2.1

Просмотреть файл

@ -110,7 +110,7 @@ public class RunTests extends MIDlet {
} }
public void startApp() { public void startApp() {
String arg = getAppProperty("arg-0"); String arg = getAppProperty("arg-0").replace('.', '/');
long then = JVM.monotonicTimeMillis(); long then = JVM.monotonicTimeMillis();
@ -128,7 +128,7 @@ public class RunTests extends MIDlet {
System.err.println("can't find test " + arg); System.err.println("can't find test " + arg);
} }
arg = getAppProperty("arg-" + ++i); arg = getAppProperty("arg-" + ++i).replace('.', '/');
} }
} else { } else {
for (int n = 0; n < Testlets.list.length; ++n) { for (int n = 0; n < Testlets.list.length; ++n) {

Просмотреть файл

@ -308,7 +308,7 @@ casper.test.begin("unit tests", 14 + gfxTests.length, function(test) {
}); });
casper casper
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1") .thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1.0.0")
.withFrame(0, function() { .withFrame(0, function() {
casper.waitForText("DONE", function() { casper.waitForText("DONE", function() {
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Download"); test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Download");
@ -318,7 +318,7 @@ casper.test.begin("unit tests", 14 + gfxTests.length, function(test) {
// Run the test a second time to ensure loading the JAR stored in the FS works correctly. // Run the test a second time to ensure loading the JAR stored in the FS works correctly.
casper casper
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1") .thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1.0.0")
.withFrame(0, function() { .withFrame(0, function() {
casper.waitForText("DONE", function() { casper.waitForText("DONE", function() {
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Load"); test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Load");
@ -347,7 +347,7 @@ casper.test.begin("unit tests", 14 + gfxTests.length, function(test) {
// Verify that the update has been applied // Verify that the update has been applied
casper casper
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=3") .thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=3.0.0")
.withFrame(0, function() { .withFrame(0, function() {
casper.waitForText("DONE", function() { casper.waitForText("DONE", function() {
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Load after update"); test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Load after update");
@ -361,7 +361,7 @@ casper.test.begin("unit tests", 14 + gfxTests.length, function(test) {
.waitForText("DONE"); .waitForText("DONE");
casper casper
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest2.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=2") .thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest2.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=2.0.0")
.withFrame(0, function() { .withFrame(0, function() {
casper.waitForText("DONE", function() { casper.waitForText("DONE", function() {
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Download with absolute URL"); test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Download with absolute URL");