You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/01/17 09:04:51 UTC
[maven-fluido-skin] 07/10: [MSKINS-204] Make MSKINS-76 ITs more tolerant
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch maven-fluido-skin-1.x
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git
commit 52709784159c3b20d4baee62bc37eedc5bee925b
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Mon Jan 9 10:21:25 2023 +0100
[MSKINS-204] Make MSKINS-76 ITs more tolerant
This closes #44
---
src/it/mskins-76/verify.groovy | 9 +++++----
src/it/mskins-76_topbar/verify.groovy | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/it/mskins-76/verify.groovy b/src/it/mskins-76/verify.groovy
index 81e466b..9d4deec 100644
--- a/src/it/mskins-76/verify.groovy
+++ b/src/it/mskins-76/verify.groovy
@@ -19,7 +19,8 @@
File index = new File( basedir, "target/site/index.html" )
assert index.exists()
-assert 1 == index.getText().count( '''\
+String text = index.getText().replaceAll( "\r?\n", System.lineSeparator() )
+assert 1 == text.count( '''\
<script>
/* <![CDATA[ */
(function() {
@@ -28,9 +29,9 @@ assert 1 == index.getText().count( '''\
s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
- /* ]]> */</script>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
+ /* ]]> */</script>'''.replaceAll( "\r?\n", System.lineSeparator() ) )
-assert 1 == index.getText().count( '''\
+assert 1 == text.count( '''\
<a class="FlattrButton" style="display:none;" href="http://opensource.org/"></a>
<noscript><a href="https://flattr.com/thing/448050/Open-Source-Initiative-OSI" target="_blank">
- <img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
+ <img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.replaceAll( "\r?\n", System.lineSeparator() ) )
diff --git a/src/it/mskins-76_topbar/verify.groovy b/src/it/mskins-76_topbar/verify.groovy
index 3dd79ba..bf651d0 100644
--- a/src/it/mskins-76_topbar/verify.groovy
+++ b/src/it/mskins-76_topbar/verify.groovy
@@ -19,7 +19,8 @@
File index = new File( basedir, "target/site/index.html" )
assert index.exists()
-assert 1 == index.getText().count( '''\
+String text = index.getText().replaceAll( "\r?\n", System.lineSeparator() )
+assert 1 == text.count( '''\
<script>
/* <![CDATA[ */
(function() {
@@ -28,9 +29,9 @@ assert 1 == index.getText().count( '''\
s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
- /* ]]> */</script>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
+ /* ]]> */</script>'''.replaceAll( "\r?\n", System.lineSeparator() ) )
-assert 1 == index.getText().count( '''\
+assert 1 == text.count( '''\
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://opensource.org/"></a>
<noscript><a href="https://flattr.com/thing/448050/Open-Source-Initiative-OSI" target="_blank">
- <img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
+ <img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.replaceAll( "\r?\n", System.lineSeparator() ) )