Author: roger
Date: Fri Oct 15 13:16:05 2010
New Revision: 1022907
URL: http://svn.apache.org/viewvc?rev=1022907&view=rev
Log:
THRIFT-913 Test Case for Url encoded strings + simple enhancement to
lib/js/test/RunTestServer.sh
and ignore gen-* and *.class
Modified:
incubator/thrift/trunk/lib/js/test/ (props changed)
incubator/thrift/trunk/lib/js/test/RunTestServer.sh
incubator/thrift/trunk/lib/js/test/src/test/ (props changed)
incubator/thrift/trunk/lib/js/test/test.html
Propchange: incubator/thrift/trunk/lib/js/test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 15 13:16:05 2010
@@ -0,0 +1,4 @@
+httpcore-4.0.1.jar
+httpcomponents-core-4.0.1-bin.tar.gz
+gen-js
+gen-java
Modified: incubator/thrift/trunk/lib/js/test/RunTestServer.sh
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/js/test/RunTestServer.sh?rev=1022907&r1=1022906&r2=1022907&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/js/test/RunTestServer.sh (original)
+++ incubator/thrift/trunk/lib/js/test/RunTestServer.sh Fri Oct 15 13:16:05 2010
@@ -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
Propchange: incubator/thrift/trunk/lib/js/test/src/test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 15 13:16:05 2010
@@ -0,0 +1 @@
+*.class
Modified: incubator/thrift/trunk/lib/js/test/test.html
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/js/test/test.html?rev=1022907&r1=1022906&r2=1022907&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/js/test/test.html (original)
+++ incubator/thrift/trunk/lib/js/test/test.html Fri Oct 15 13:16:05 2010
@@ -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Ã idhli
g, 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);