mirror of https://github.com/apache/lucene.git
LUCENE-6732: More filetypes to check
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1695586 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fa48923d5d
commit
127392cc73
|
@ -134,7 +134,9 @@
|
|||
import org.apache.rat.api.MetaData;
|
||||
|
||||
def extensions = [
|
||||
'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js', 'xml', 'xsl'
|
||||
'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js',
|
||||
'css', 'xml', 'xsl', 'vm', 'sh', 'cmd', 'bat', 'policy',
|
||||
'properties',
|
||||
];
|
||||
def invalidPatterns = [
|
||||
(~$/@author\b/$) : '@author javadoc tag',
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
#Test script to tell if the server is accepting UTF-8
|
||||
#The python writer currently escapes non-ascii chars, so it's good for testing
|
||||
|
||||
URL=http://localhost:8983/solr
|
||||
SOLR_URL=http://localhost:8983/solr
|
||||
|
||||
if [ ! -z $1 ]; then
|
||||
URL=$1
|
||||
SOLR_URL=$1
|
||||
fi
|
||||
|
||||
curl "$URL/select?q=hello¶ms=explicit&wt=python" 2> /dev/null | grep 'hello' > /dev/null 2>&1
|
||||
curl "$SOLR_URL/select?q=hello¶ms=explicit&wt=python" 2> /dev/null | grep 'hello' > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "Solr server is up."
|
||||
else
|
||||
|
@ -31,21 +31,21 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
curl "$URL/select?q=h%C3%A9llo&echoParams=explicit&wt=python" 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
|
||||
curl "$SOLR_URL/select?q=h%C3%A9llo&echoParams=explicit&wt=python" 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "HTTP GET is accepting UTF-8"
|
||||
else
|
||||
echo "ERROR: HTTP GET is not accepting UTF-8"
|
||||
fi
|
||||
|
||||
curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
|
||||
curl $SOLR_URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "HTTP POST is accepting UTF-8"
|
||||
else
|
||||
echo "ERROR: HTTP POST is not accepting UTF-8"
|
||||
fi
|
||||
|
||||
curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
|
||||
curl $SOLR_URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "HTTP POST defaults to UTF-8"
|
||||
else
|
||||
|
@ -57,33 +57,33 @@ fi
|
|||
CHAR="𐌈"
|
||||
CODEPOINT='0x10308'
|
||||
#URL encoded UTF8 of the codepoint
|
||||
URL_UTF8='%F0%90%8C%88'
|
||||
UTF8_Q='%F0%90%8C%88'
|
||||
#expected return of the python writer (currently uses UTF-16 surrogates)
|
||||
EXPECTED='\\ud800\\udf08'
|
||||
|
||||
curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
|
||||
curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit&wt=python" 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "HTTP GET is accepting UTF-8 beyond the basic multilingual plane"
|
||||
else
|
||||
echo "ERROR: HTTP GET is not accepting UTF-8 beyond the basic multilingual plane"
|
||||
fi
|
||||
|
||||
curl $URL/select --data-binary "q=$URL_UTF8&echoParams=explicit&wt=python" -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
|
||||
curl $SOLR_URL/select --data-binary "q=$UTF8_Q&echoParams=explicit&wt=python" -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "HTTP POST is accepting UTF-8 beyond the basic multilingual plane"
|
||||
else
|
||||
echo "ERROR: HTTP POST is not accepting UTF-8 beyond the basic multilingual plane"
|
||||
fi
|
||||
|
||||
curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" --data-binary '' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
|
||||
curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit&wt=python" --data-binary '' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "HTTP POST + URL params is accepting UTF-8 beyond the basic multilingual plane"
|
||||
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 | grep "$CHAR" > /dev/null 2>&1
|
||||
#curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit&wt=json" 2> /dev/null | od -tx1 -w1000 | sed 's/ //g' | grep 'f4808198' > /dev/null 2>&1
|
||||
curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit&wt=json" 2> /dev/null | grep "$CHAR" > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "Response correctly returns UTF-8 beyond the basic multilingual plane"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue