THRIFT-913 Test Case for Url encoded strings + simple enhancement to lib/js/test/RunTestServer.sh
and ignore gen-* and *.class


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1022907 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/js/test/RunTestServer.sh b/lib/js/test/RunTestServer.sh
index 574f7c5..4c41ac1 100755
--- a/lib/js/test/RunTestServer.sh
+++ b/lib/js/test/RunTestServer.sh
@@ -19,17 +19,26 @@
 # under the License.
 #
 
-LOG4J="../../java/build/ivy/lib/slf4j-api-1.5.8.jar:../../java/build/ivy/lib/log4j-1.2.15.jar:../../java/build/ivy/lib/slf4j-simple-1.5.8.jar"
+LOG4J="../../java/build/ivy/lib/slf4j-api-1.5.8.jar:../../java/build/ivy/lib/log4j-1.2.14.jar:../../java/build/ivy/lib/slf4j-log4j12-1.5.8.jar"
 HTTPCORE="./httpcore-4.0.1.jar"
 
 if [ -f ${HTTPCORE} ]
 then
     echo "compiling test..."
 else
-    echo "Missing required file ${HTTPCORE}"
-    echo "You can download this from http://archive.apache.org/dist/httpcomponents/httpcore/binary/httpcomponents-core-4.0.1-bin.tar.gz"
-    echo "Place the jar in this directory and try again."
-    exit
+    echo "try to download httpcore..."
+
+    wget http://archive.apache.org/dist/httpcomponents/httpcore/binary/httpcomponents-core-4.0.1-bin.tar.gz
+    # extract required jar file
+    tar -xzf httpcomponents-core-4.0.1-bin.tar.gz httpcomponents-core-4.0.1/lib/httpcore-4.0.1.jar --to-stdout > ${HTTPCORE}
+
+    if [ ! -f ${HTTPCORE} ]
+    then
+        echo "Missing required file ${HTTPCORE}"
+        echo "You can download this from http://archive.apache.org/dist/httpcomponents/httpcore/binary/httpcomponents-core-4.0.1-bin.tar.gz"
+        echo "Place the jar in this directory and try again."
+        exit
+    fi
 fi
 
 ../../../compiler/cpp/thrift --gen java ../../../test/ThriftTest.thrift
diff --git a/lib/js/test/test.html b/lib/js/test/test.html
index cf3d668..8a62bf8 100644
--- a/lib/js/test/test.html
+++ b/lib/js/test/test.html
@@ -53,6 +53,13 @@
       // all Languages in UTF-8
       var stringTest = "Afrikaans, Alemannisch, Aragonés, العربية, مصرى, Asturianu, Aymar aru, Azərbaycan, Башҡорт, Boarisch, Žemaitėška, Беларуская, Беларуская (тарашкевіца), Български, Bamanankan, বাংলা, Brezhoneg, Bosanski, Català, Mìng-dĕ̤ng-ngṳ̄, Нохчийн, Cebuano, ᏣᎳᎩ, Česky, Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ, Чӑвашла, Cymraeg, Dansk, Zazaki, ދިވެހިބަސް, Ελληνικά, Emiliàn e rumagnòl, English, Esperanto, Español, Eesti, Euskara, فارسی, Suomi, Võro, Føroyskt, Français, Arpetan, Furlan, Frysk, Gaeilge, 贛語, Gàidhlig, Galego, Avañe'ẽ, ગુજરાતી, Gaelg, עברית, हिन्दी, Fiji Hindi, Hrvatski, Kreyòl ayisyen, Magyar, Հայերեն, Interlingua, Bahasa Indonesia, Ilokano, Ido, Íslenska, Italiano, 日本語, Lojban, Basa Jawa, ქართული, Kongo, Kalaallisut, ಕನ್ನಡ, 한국어, Къарачай-Малкъар, Ripoarisch, Kurdî, Коми, Kernewek, Кыргызча, Latina, Ladino, Lëtzebuergesch, Limburgs, Lingála, ລາວ, Lietuvių, Latviešu, Basa Banyumasan, Malagasy, Македонски, മലയാളം, मराठी, Bahasa Melayu, مازِرونی, Nnapulitano, Nedersaksisch, नेपाल भाषा, Nederlands, ‪Norsk (nynorsk)‬, ‪Norsk (bokmål)‬, Nouormand, Diné bizaad, Occitan, Иронау, Papiamentu, Deitsch, Norfuk / Pitkern, Polski, پنجابی, پښتو, Português, Runa Simi, Rumantsch, Romani, Română, Русский, Саха тыла, Sardu, Sicilianu, Scots, Sámegiella, Simple English, Slovenčina, Slovenščina, Српски / Srpski, Seeltersk, Svenska, Kiswahili, தமிழ், తెలుగు, Тоҷикӣ, ไทย, Türkmençe, Tagalog, Türkçe, Татарча/Tatarça, Українська, اردو, Tiếng Việt, Volapük, Walon, Winaray, 吴语, isiXhosa, ייִדיש, Yorùbá, Zeêuws, 中文, Bân-lâm-gú, 粵語";
       equals(client.testString(stringTest), stringTest);
+
+      var specialCharacters = 'quote: \" backslash:' +
+            ' forwardslash-escaped: \/ ' +
+            ' backspace: \b formfeed: \f newline: \n return: \r tab: ' +
+            ' now-all-of-them-together: "\\\/\b\n\r\t' +
+            ' now-a-bunch-of-junk: !@#$%&()(&%$#{}{}<><><';
+      equals(client.testString(specialCharacters),specialCharacters);
     });
     test("Double", function() {
       equals(client.testDouble(3.14), 3.14);