Skip to content

Commit

Permalink
Use system-specific line separators in ConfigurationWriterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
fergal-whyte committed Oct 26, 2023
1 parent f92fc63 commit 836253f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/src/test/kotlin/proguard/ConfigurationWriterTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import java.io.StringWriter
* Test printing of the configuration (-printconfiguration option).
*/
class ConfigurationWriterTest : FreeSpec({
val EOL = System.lineSeparator()
fun printConfiguration(rules: String): String {
val out = StringWriter()
val configuration = Configuration()
Expand All @@ -31,11 +32,11 @@ class ConfigurationWriterTest : FreeSpec({
}

"Comments should not be quoted" {
printConfiguration("# comment\n-keep class **") shouldBe "# comment\n-keep class **"
printConfiguration("# comment$EOL-keep class **") shouldBe "# comment$EOL-keep class **"
}

"Hash characters in comments should not be quoted" {
printConfiguration("# #comment\n-keep class **") shouldBe "# #comment\n-keep class **"
printConfiguration("# #comment$EOL-keep class **") shouldBe "# #comment$EOL-keep class **"
}
}

Expand Down

0 comments on commit 836253f

Please sign in to comment.