You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2011/02/25 23:09:14 UTC

svn commit: r1074716 - /lucene/dev/trunk/solr/example/exampledocs/test_utf8.sh

Author: yonik
Date: Fri Feb 25 22:09:14 2011
New Revision: 1074716

URL: http://svn.apache.org/viewvc?rev=1074716&view=rev
Log:
tests: change UTF8 test to easy char, directly grep since 'od' options vary

Modified:
    lucene/dev/trunk/solr/example/exampledocs/test_utf8.sh

Modified: lucene/dev/trunk/solr/example/exampledocs/test_utf8.sh
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/exampledocs/test_utf8.sh?rev=1074716&r1=1074715&r2=1074716&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/exampledocs/test_utf8.sh (original)
+++ lucene/dev/trunk/solr/example/exampledocs/test_utf8.sh Fri Feb 25 22:09:14 2011
@@ -53,12 +53,13 @@ else
 fi
 
 
-#A codepoint outside of the BMP
-CODEPOINT='\\U00100058'
+#A unicode character outside of the BMP (a circle with an x inside)
+CHAR="𐌈"
+CODEPOINT='0x10308'
 #URL encoded UTF8 of the codepoint
-URL_UTF8='%F4%80%81%98'
+URL_UTF8='%F0%90%8C%88'
 #expected return of the python writer (currently uses UTF-16 surrogates)
-EXPECTED='\\udbc0\\udc58'
+EXPECTED='\\ud800\\udf08'
 
 curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
 if [ $? = 0 ]; then
@@ -81,9 +82,10 @@ else
   echo "ERROR: HTTP POST + URL params is not accepting UTF-8 beyond the basic multilingual plane"
 fi
 
-curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | od -tx1 -w1000 | sed 's/ //g' | grep 'f4808198' > /dev/null 2>&1
+#curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | od -tx1 -w1000 | sed 's/ //g' | grep 'f4808198' > /dev/null 2>&1
+curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | grep "$CHAR" > /dev/null 2>&1
 if [ $? = 0 ]; then
-  echo "Response can return UTF-8 beyond the basic multilingual plane"
+  echo "Response correctly returns UTF-8 beyond the basic multilingual plane"
 else
   echo "ERROR: Response can't return UTF-8 beyond the basic multilingual plane"
 fi