Commit 466c874d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Dridi Boukelmoune

Sync VJSN tests with Nicolas Seriots master list

parent be5595b7
...@@ -520,40 +520,45 @@ vjsn_dump(const struct vjsn *js, FILE *fo) ...@@ -520,40 +520,45 @@ vjsn_dump(const struct vjsn *js, FILE *fo)
* *
* And run this python in test_parsing: * And run this python in test_parsing:
import glob import glob
def emit(fin): skip = {}
if fin in skip:
return def emit(fin):
x = bytearray(open(fin).read()) if fin in skip:
if 0 in x: return
return x = bytearray(open(fin).read())
if len(x) > 1000: if 0 in x:
return return
t = '\t"' if len(x) > 1000:
for i in x: return
t += "\\x%02x" % i t = '\t"'
if len(t) > 64: for i in x:
print(t + '"') t += "\\x%02x" % i
t = '\t"' if len(t) > 64:
print(t + '",') print(t + '"')
t = '\t"'
print("const char *good[] = {") print(t + '",')
for f in glob.glob("y_*"):
emit(f) print("const char *good[] = {")
print("\tNULL") l = list(glob.glob("y_*"))
print("};") l.sort()
for f in l:
print("const char *bad[] = {") emit(f)
for f in glob.glob("n_*"): print("\tNULL")
emit(f) print("};")
print("\tNULL")
print("};") print("const char *bad[] = {")
l = list(glob.glob("n_*"))
*/ l.sort()
for f in l:
emit(f)
print("\tNULL")
print("};")
*/
static const char *good[] = { static const char *good[] = {
"\x5b\x31\x32\x33\x65\x36\x35\x5d",
"\x5b\x5b\x5d\x20\x20\x20\x5d", "\x5b\x5b\x5d\x20\x20\x20\x5d",
"\x5b\x22\x22\x5d", "\x5b\x22\x22\x5d",
"\x5b\x5d", "\x5b\x5d",
...@@ -567,6 +572,7 @@ static const char *good[] = { ...@@ -567,6 +572,7 @@ static const char *good[] = {
"\x5b\x31\x2c\x6e\x75\x6c\x6c\x2c\x6e\x75\x6c\x6c\x2c\x6e\x75\x6c" "\x5b\x31\x2c\x6e\x75\x6c\x6c\x2c\x6e\x75\x6c\x6c\x2c\x6e\x75\x6c"
"\x6c\x2c\x32\x5d", "\x6c\x2c\x32\x5d",
"\x5b\x32\x5d\x20", "\x5b\x32\x5d\x20",
"\x5b\x31\x32\x33\x65\x36\x35\x5d",
"\x5b\x30\x65\x2b\x31\x5d", "\x5b\x30\x65\x2b\x31\x5d",
"\x5b\x30\x65\x31\x5d", "\x5b\x30\x65\x31\x5d",
"\x5b\x20\x34\x5d", "\x5b\x20\x34\x5d",
...@@ -620,10 +626,10 @@ static const char *good[] = { ...@@ -620,10 +626,10 @@ static const char *good[] = {
"\x34\x33\x35\x5c\x75\x30\x34\x33\x61\x5c\x75\x30\x34\x33\x65\x5c" "\x34\x33\x35\x5c\x75\x30\x34\x33\x61\x5c\x75\x30\x34\x33\x65\x5c"
"\x75\x30\x34\x33\x66\x5c\x75\x30\x34\x33\x30\x22\x20\x7d", "\x75\x30\x34\x33\x66\x5c\x75\x30\x34\x33\x30\x22\x20\x7d",
"\x7b\x0a\x22\x61\x22\x3a\x20\x22\x62\x22\x0a\x7d", "\x7b\x0a\x22\x61\x22\x3a\x20\x22\x62\x22\x0a\x7d",
"\x5b\x22\x5c\x75\x44\x38\x30\x31\x5c\x75\x64\x63\x33\x37\x22\x5d"
"",
"\x5b\x22\x5c\x75\x30\x30\x36\x30\x5c\x75\x30\x31\x32\x61\x5c\x75" "\x5b\x22\x5c\x75\x30\x30\x36\x30\x5c\x75\x30\x31\x32\x61\x5c\x75"
"\x31\x32\x41\x42\x22\x5d", "\x31\x32\x41\x42\x22\x5d",
"\x5b\x22\x5c\x75\x44\x38\x30\x31\x5c\x75\x64\x63\x33\x37\x22\x5d"
"",
"\x5b\x22\x5c\x75\x64\x38\x33\x64\x5c\x75\x64\x65\x33\x39\x5c\x75" "\x5b\x22\x5c\x75\x64\x38\x33\x64\x5c\x75\x64\x65\x33\x39\x5c\x75"
"\x64\x38\x33\x64\x5c\x75\x64\x63\x38\x64\x22\x5d", "\x64\x38\x33\x64\x5c\x75\x64\x63\x38\x64\x22\x5d",
"\x5b\x22\x5c\x22\x5c\x5c\x5c\x2f\x5c\x62\x5c\x66\x5c\x6e\x5c\x72" "\x5b\x22\x5c\x22\x5c\x5c\x5c\x2f\x5c\x62\x5c\x66\x5c\x6e\x5c\x72"
...@@ -637,17 +643,17 @@ static const char *good[] = { ...@@ -637,17 +643,17 @@ static const char *good[] = {
"\x5b\x22\x5c\x75\x30\x30\x31\x32\x22\x5d", "\x5b\x22\x5c\x75\x30\x30\x31\x32\x22\x5d",
"\x5b\x22\x5c\x75\x46\x46\x46\x46\x22\x5d", "\x5b\x22\x5c\x75\x46\x46\x46\x46\x22\x5d",
"\x5b\x22\x61\x73\x64\x22\x5d", "\x5b\x22\x61\x73\x64\x22\x5d",
"\x5b\x22\x6e\x65\x77\x5c\x75\x30\x30\x41\x30\x6c\x69\x6e\x65\x22"
"\x5d",
"\x5b\x20\x22\x61\x73\x64\x22\x5d", "\x5b\x20\x22\x61\x73\x64\x22\x5d",
"\x5b\x22\x5c\x75\x44\x42\x46\x46\x5c\x75\x44\x46\x46\x46\x22\x5d" "\x5b\x22\x5c\x75\x44\x42\x46\x46\x5c\x75\x44\x46\x46\x46\x22\x5d"
"", "",
"\x5b\x22\x6e\x65\x77\x5c\x75\x30\x30\x41\x30\x6c\x69\x6e\x65\x22"
"\x5d",
"\x5b\x22\xf4\x8f\xbf\xbf\x22\x5d", "\x5b\x22\xf4\x8f\xbf\xbf\x22\x5d",
"\x5b\x22\xf0\x9b\xbf\xbf\x22\x5d",
"\x5b\x22\xef\xbf\xbf\x22\x5d", "\x5b\x22\xef\xbf\xbf\x22\x5d",
"\x5b\x22\x5c\x75\x30\x30\x30\x30\x22\x5d", "\x5b\x22\x5c\x75\x30\x30\x30\x30\x22\x5d",
"\x5b\x22\x5c\x75\x30\x30\x32\x63\x22\x5d", "\x5b\x22\x5c\x75\x30\x30\x32\x63\x22\x5d",
"\x5b\x22\xcf\x80\x22\x5d", "\x5b\x22\xcf\x80\x22\x5d",
"\x5b\x22\xf0\x9b\xbf\xbf\x22\x5d",
"\x5b\x22\x61\x73\x64\x20\x22\x5d", "\x5b\x22\x61\x73\x64\x20\x22\x5d",
"\x22\x20\x22", "\x22\x20\x22",
"\x5b\x22\x5c\x75\x44\x38\x33\x34\x5c\x75\x44\x64\x31\x65\x22\x5d" "\x5b\x22\x5c\x75\x44\x38\x33\x34\x5c\x75\x44\x64\x31\x65\x22\x5d"
...@@ -668,12 +674,12 @@ static const char *good[] = { ...@@ -668,12 +674,12 @@ static const char *good[] = {
"", "",
"\x5b\x22\x5c\x75\x44\x38\x33\x46\x5c\x75\x44\x46\x46\x45\x22\x5d" "\x5b\x22\x5c\x75\x44\x38\x33\x46\x5c\x75\x44\x46\x46\x45\x22\x5d"
"", "",
"\x5b\x22\xe2\x82\xac\xf0\x9d\x84\x9e\x22\x5d",
"\x5b\x22\x5c\x75\x32\x30\x30\x42\x22\x5d", "\x5b\x22\x5c\x75\x32\x30\x30\x42\x22\x5d",
"\x5b\x22\x5c\x75\x32\x30\x36\x34\x22\x5d", "\x5b\x22\x5c\x75\x32\x30\x36\x34\x22\x5d",
"\x5b\x22\x5c\x75\x46\x44\x44\x30\x22\x5d", "\x5b\x22\x5c\x75\x46\x44\x44\x30\x22\x5d",
"\x5b\x22\x5c\x75\x46\x46\x46\x45\x22\x5d", "\x5b\x22\x5c\x75\x46\x46\x46\x45\x22\x5d",
"\x5b\x22\x5c\x75\x30\x30\x32\x32\x22\x5d", "\x5b\x22\x5c\x75\x30\x30\x32\x32\x22\x5d",
"\x5b\x22\xe2\x82\xac\xf0\x9d\x84\x9e\x22\x5d",
"\x5b\x22\x61\x7f\x61\x22\x5d", "\x5b\x22\x61\x7f\x61\x22\x5d",
"\x66\x61\x6c\x73\x65", "\x66\x61\x6c\x73\x65",
"\x34\x32", "\x34\x32",
...@@ -698,9 +704,9 @@ static const char *bad[] = { ...@@ -698,9 +704,9 @@ static const char *bad[] = {
"\x5b\x22\x78\x22\x5d\x5d", "\x5b\x22\x78\x22\x5d\x5d",
"\x5b\x22\x22\x2c\x5d", "\x5b\x22\x22\x2c\x5d",
"\x5b\x22\x78\x22", "\x5b\x22\x78\x22",
"\x5b\xff\x5d",
"\x5b\x78", "\x5b\x78",
"\x5b\x33\x5b\x34\x5d\x5d", "\x5b\x33\x5b\x34\x5d\x5d",
"\x5b\xff\x5d",
"\x5b\x31\x3a\x32\x5d", "\x5b\x31\x3a\x32\x5d",
"\x5b\x2c\x5d", "\x5b\x2c\x5d",
"\x5b\x2d\x5d", "\x5b\x2d\x5d",
...@@ -776,6 +782,7 @@ static const char *bad[] = { ...@@ -776,6 +782,7 @@ static const char *bad[] = {
"\x7b\xf0\x9f\x87\xa8\xf0\x9f\x87\xad\x7d", "\x7b\xf0\x9f\x87\xa8\xf0\x9f\x87\xad\x7d",
"\x7b\x22\x61\x22\x3a\x22\x61\x22\x20\x31\x32\x33\x7d", "\x7b\x22\x61\x22\x3a\x22\x61\x22\x20\x31\x32\x33\x7d",
"\x7b\x6b\x65\x79\x3a\x20\x27\x76\x61\x6c\x75\x65\x27\x7d", "\x7b\x6b\x65\x79\x3a\x20\x27\x76\x61\x6c\x75\x65\x27\x7d",
"\x7b\x22\xb9\x22\x3a\x22\x30\x22\x2c\x7d",
"\x7b\x22\x61\x22\x20\x62\x7d", "\x7b\x22\x61\x22\x20\x62\x7d",
"\x7b\x3a\x22\x62\x22\x7d", "\x7b\x3a\x22\x62\x22\x7d",
"\x7b\x22\x61\x22\x20\x22\x62\x22\x7d", "\x7b\x22\x61\x22\x20\x22\x62\x22\x7d",
...@@ -783,7 +790,6 @@ static const char *bad[] = { ...@@ -783,7 +790,6 @@ static const char *bad[] = {
"\x7b\x22\x61\x22", "\x7b\x22\x61\x22",
"\x7b\x31\x3a\x31\x7d", "\x7b\x31\x3a\x31\x7d",
"\x7b\x39\x39\x39\x39\x45\x39\x39\x39\x39\x3a\x31\x7d", "\x7b\x39\x39\x39\x39\x45\x39\x39\x39\x39\x3a\x31\x7d",
"\x7b\x22\xb9\x22\x3a\x22\x30\x22\x2c\x7d",
"\x7b\x6e\x75\x6c\x6c\x3a\x6e\x75\x6c\x6c\x2c\x6e\x75\x6c\x6c\x3a" "\x7b\x6e\x75\x6c\x6c\x3a\x6e\x75\x6c\x6c\x2c\x6e\x75\x6c\x6c\x3a"
"\x6e\x75\x6c\x6c\x7d", "\x6e\x75\x6c\x6c\x7d",
"\x7b\x22\x69\x64\x22\x3a\x30\x2c\x2c\x2c\x2c\x2c\x7d", "\x7b\x22\x69\x64\x22\x3a\x30\x2c\x2c\x2c\x2c\x2c\x7d",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment