Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22213#discussion_r216094051
  
    --- Diff: core/src/test/scala/org/apache/spark/util/UtilsSuite.scala ---
    @@ -1205,6 +1205,39 @@ class UtilsSuite extends SparkFunSuite with 
ResetSystemProperties with Logging {
         assert(Utils.stringHalfWidth("\u0967\u0968\u0969") == 3)
         // scalastyle:on nonascii
       }
    +
    +  test("trimExceptCRLF standalone") {
    +    val crlfSet = Set("\r", "\n")
    +    val nonPrintableButCRLF =
    +      (0 to 32).map(_.toChar.toString).toSet -- crlfSet
    +
    +    // identity for CRLF
    +    crlfSet
    +      .foreach(s => Utils.trimExceptCRLF(s) === s)
    --- End diff --
    
    nit. `.foreach { s => ... }` (also in others)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to