royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-compiler] branch feature/rename updated: ignore paths when comparing swfdumps
Date Wed, 29 Nov 2017 08:35:15 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/rename
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/feature/rename by this push:
     new 52157b3  ignore paths when comparing swfdumps
52157b3 is described below

commit 52157b309a3b4b3bf7f6a7c45fa6cefa2f2eaeea
Author: Alex Harui <aharui@apache.org>
AuthorDate: Wed Nov 29 00:35:07 2017 -0800

    ignore paths when comparing swfdumps
---
 compiler/src/test/java/as/ASFeatureTestsBase.java | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/compiler/src/test/java/as/ASFeatureTestsBase.java b/compiler/src/test/java/as/ASFeatureTestsBase.java
index cb2ae50..09061a6 100644
--- a/compiler/src/test/java/as/ASFeatureTestsBase.java
+++ b/compiler/src/test/java/as/ASFeatureTestsBase.java
@@ -284,6 +284,13 @@ public class ASFeatureTestsBase
 					c = resultText.indexOf("<asc:compiler");
 					c2 = resultText.indexOf("/>\n", c);
 					resultText = resultText.substring(0, c) + resultText.substring(c2 + 4);
+                    // remove parsing swf comment as it contains local path to swf
+                    c = ours.indexOf("<!-- Parsing swf");
+                    c2 = ours.indexOf("-->\n", c);
+                    ours = ours.substring(0, c) + ours.substring(c2 + 4);
+                    c = resultText.indexOf("<!-- Parsing swf");
+                    c2 = resultText.indexOf("-->\n", c);
+                    resultText = resultText.substring(0, c) + resultText.substring(c2 + 4);
 					// output contains 'succ[...]' which can be in different order
 					ours = ours.replaceAll("succs=\\[.*\\]", "");
 					resultText = resultText.replaceAll("succs=\\[.*\\]", "");
@@ -305,10 +312,6 @@ public class ASFeatureTestsBase
 						resultLines[i] = resultLines[i].trim();
 					}
 					resultText = StringUtils.join(resultLines, "\n");
-					resultText = resultText.replaceAll("surefire-temp/", "");
-					resultText = resultText.replaceAll("junit-temp/", "");
-					ours = ours.replaceAll("surefire-temp/", "");
-					ours = ours.replaceAll("junit-temp/", "");
 					assertThat(ours, is(resultText));
 					break;
 				}

-- 
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <commits@royale.apache.org>'].

Mime
View raw message