reduce ufuzz test cases that fail to minify() (#4021)

This commit is contained in:
Alex Lam S.L
2020-07-21 09:17:15 +01:00
committed by alexlamsl
parent cd671221c5
commit a98ba994bd

View File

@@ -1137,18 +1137,6 @@ function log(options) {
errorln(original_result);
errorln("uglified result:");
errorln(uglify_result);
errorln("//-------------------------------------------------------------");
var reduced = reduce_test(original_code, JSON.parse(options), {
verbose: false,
}).code;
if (reduced) {
errorln();
errorln("// reduced test case (output will differ)");
errorln();
errorln(reduced);
errorln();
errorln("//-------------------------------------------------------------");
}
} else {
errorln("// !!! uglify failed !!!");
errorln(uglify_code);
@@ -1159,6 +1147,18 @@ function log(options) {
errorln(original_result);
}
}
errorln("//-------------------------------------------------------------");
var reduced = reduce_test(original_code, JSON.parse(options), {
verbose: false,
}).code;
if (reduced) {
errorln();
errorln("// reduced test case (output will differ)");
errorln();
errorln(reduced);
errorln();
errorln("//-------------------------------------------------------------");
}
errorln("minify(options):");
errorln(JSON.stringify(JSON.parse(options), null, 2));
errorln();