seed r152 - trunk/tests
- From: hortont svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r152 - trunk/tests
- Date: Fri, 7 Nov 2008 04:51:23 +0000 (UTC)
Author: hortont
Date: Fri Nov 7 04:51:23 2008
New Revision: 152
URL: http://svn.gnome.org/viewvc/seed?rev=152&view=rev
Log:
Fix up make-test. Should handle multilines and escaped stuff "properly".
Modified:
trunk/tests/make-test.py
Modified: trunk/tests/make-test.py
==============================================================================
--- trunk/tests/make-test.py (original)
+++ trunk/tests/make-test.py Fri Nov 7 04:51:23 2008
@@ -22,19 +22,20 @@
outf = open(sys.argv[1].replace("_.js",".js"),"w")
def sanitize(san):
- san = san.replace("(","\\(");
- san = san.replace(")","\\)");
- san = san.replace("[","\\[");
- san = san.replace("]","\\]");
- san = san.replace("{","\\{");
- san = san.replace("}","\\}");
- san = san.replace(".","\\.");
- san = san.replace("*","\\*");
- san = san.replace("$","\\$");
- san = san.replace("^","\\^");
- san = san.replace("/","\\/");
san = san.replace("\\","\\\\");
- san = san.replace("+","\\+");
+ san = san.replace("(","\(");
+ san = san.replace(")","\)");
+ san = san.replace("[","\[");
+ san = san.replace("]","\]");
+ san = san.replace("{","\{");
+ san = san.replace("}","\}");
+ san = san.replace(".","\.");
+ san = san.replace("*","\*");
+ san = san.replace("$","\$");
+ san = san.replace("^","\^");
+ san = san.replace("/","\/");
+ san = san.replace("+","\+");
+ san = san.replace("\n","\\n");
return san
outf.write(test_code[0])
@@ -43,7 +44,10 @@
outf.write("// STDOUT:" + sanitize("".join(out.readlines()).rstrip()) + "\n")
outf.write("// STDERR:" + sanitize("".join(out.readlines()).rstrip()) + "\n")
-outf.write("".join(test_code[2:]))
+if(test_in != ""):
+ outf.write("".join(test_code[2:]))
+else:
+ outf.write("".join(test_code[1:]))
outf.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]