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fA|YPMJ~n@+l|A^fZ@)>6WaQjmk8ZJ#x&3N#Pg9}m0?b+g0CE8Z)?lu
zNq&<;h7V;+s->f+;D)c}`nevL4#OtO)Aw{^{GIHTOT_+}?Y
zSF9~z+h2Gg8|kpg1;EG0$JqeI-KFKF_NRSaF3;UuS@xswI4{bJ#x;BHI*P;>N-pVA
zF9!GJZg>_{jr;`+e_oS&xn0^~*p$rj$(gkumXuN45k}u&;>o`9nC+{yn$e)e
zBIO2**)VtJSp%_wLmN%okA@^&Gr1WTSX%hp3Nv=1d_~`_#0v2{4@>omEpM`fJ053)Vjg$tNU~IY
zdAv((0{CwQ^Pik17|(l6444KvK3IrnvXX5!>0v;!igV?II;XsuNb_t`ta09)8i7V_
zHbZw~2o}Jl?uy_kU$lRc0=m#@#$_W)xS`#!3Y$f$M7F^5t8?3ZLjP|#$
zP((8lGWb8&WP&%!o(8nhaD>57skPC05t@%u*;Uqp4J$7*=)$aJHY`l~g5Xke@mAbs
zUu=M=F0EZGHslGU>C(BEx^%OF(GCqxIQQ{#ffjYW!a;C{?3(uw&2@Mpj+F
zkiR$a#;*$yfZQ|^8V)olF-4bPzNS;i0kYL?}LC!6E`;0@+DKlqe6
zt`B~8j`stR=h;8x;`34;824Ye{$EJBApRkDSO9!r{lcQy
z$GZ4SQXgpX7ypT?Zb|ZAza@ze6kGn6k6D)dU;Wv8%WPl%o=821RZ>Iy6Brl*EEpL6
z-|PI}qws4{1ZXOP5amCY0~YL`EsR(2A-G~eMzO@8tQEwM-7Ei!pyNSI@q~2$%Ua#x
z6S-s>6c`v8-2Yyl7lgX{Z!^2#Dn2+ONN4p6@!$3T&y(N(1Y`tCTc!L6x*=|
jar
- morunner
+ mo-tester
http://maven.apache.org
diff --git a/src/main/java/io/mo/Tester.java b/src/main/java/io/mo/Tester.java
index f5b895d46d..491b8f33a2 100755
--- a/src/main/java/io/mo/Tester.java
+++ b/src/main/java/io/mo/Tester.java
@@ -165,8 +165,9 @@ public static void main(String[] args){
public static void run(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
@@ -186,8 +187,9 @@ public static void run(File file){
public static void generateRs(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
@@ -209,8 +211,9 @@ public static void generateRs(File file){
public static void debug(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
@@ -228,8 +231,9 @@ public static void debug(File file){
public static void check(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
TestScript script = ScriptParser.getTestScript();
diff --git a/src/main/java/io/mo/db/Executor.java b/src/main/java/io/mo/db/Executor.java
index daf9413504..7260dc9285 100755
--- a/src/main/java/io/mo/db/Executor.java
+++ b/src/main/java/io/mo/db/Executor.java
@@ -224,8 +224,26 @@ public static boolean genRS(TestScript script){
ArrayList commands = script.getCommands();
for (int j = 0; j < commands.size(); j++) {
SqlCommand command = null;
+
try{
command = commands.get(j);
+
+ if(command.isIgnore()) {
+ rs_writer.write(command.getCommand().trim());
+ rs_writer.newLine();
+ if (isUpdate) {
+ if (command.getExpResult() != null) {
+ if (command.getExpResult().getType() != RESULT.STMT_RESULT_TYPE_NONE)
+ rs_writer.write(command.getExpResult().getOrginalRSText());
+ }
+ } else {
+ rs_writer.write("[unknown result because it is related to issue#" + command.getIssueNo() + "]");
+ }
+ if(j < commands.size() -1)
+ rs_writer.newLine();
+ continue;
+ }
+
connection = getConnection(command);
statement = connection.createStatement();
@@ -238,7 +256,8 @@ public static boolean genRS(TestScript script){
actResult.setCommand(command);
rs_writer.write(command.getCommand().trim());
rs_writer.newLine();
- if(command.isIgnore()) {
+ rs_writer.write(actResult.toString());
+ /*if(command.isIgnore()) {
if (isUpdate) {
if (command.getExpResult() != null) {
if (command.getExpResult().getType() != RESULT.STMT_RESULT_TYPE_NONE)
@@ -254,7 +273,7 @@ public static boolean genRS(TestScript script){
}
else {
rs_writer.write(actResult.toString());
- }
+ }*/
if(j < commands.size() -1)
rs_writer.newLine();