[GitHub] commons-text pull request #60: additional-tests

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text pull request #60: additional-tests

kinow
GitHub user TheRealHaui opened a pull request:

    https://github.com/apache/commons-text/pull/60

    additional-tests

    Added Unit Tests which cover previously untested code.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/TheRealHaui/commons-text additional-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-text/pull/60.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #60
   
----
commit 80ceb20f7a6106195f8975181170cec108428667
Author: Michael Hausegger <[hidden email]>
Date:   2017-07-31T21:58:18Z

    additional-tests Added Unit Tests which cover previously untested code.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text issue #60: additional-tests

kinow
Github user coveralls commented on the issue:

    https://github.com/apache/commons-text/pull/60
 
   
    [![Coverage Status](https://coveralls.io/builds/12630213/badge)](https://coveralls.io/builds/12630213)
   
    Coverage increased (+0.3%) to 98.489% when pulling **80ceb20f7a6106195f8975181170cec108428667 on TheRealHaui:additional-tests** into **998764ebe38113eb51e6850058ca01936625dd92 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text issue #60: additional-tests

kinow
In reply to this post by kinow
Github user coveralls commented on the issue:

    https://github.com/apache/commons-text/pull/60
 
   
    [![Coverage Status](https://coveralls.io/builds/12630213/badge)](https://coveralls.io/builds/12630213)
   
    Coverage increased (+0.3%) to 98.489% when pulling **80ceb20f7a6106195f8975181170cec108428667 on TheRealHaui:additional-tests** into **998764ebe38113eb51e6850058ca01936625dd92 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text pull request #60: additional-tests

kinow
In reply to this post by kinow
Github user PascalSchumacher commented on a diff in the pull request:

    https://github.com/apache/commons-text/pull/60#discussion_r130549181
 
    --- Diff: src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java ---
    @@ -592,4 +593,43 @@ public void testUnscapeXSI() {
             assertEquals("", unescapeXSI("\\"));
         }
     
    +    @Test
    +    public void testUnescapeEcmaScript() {
    +        assertNull("Should be null.", StringEscapeUtils.unescapeEcmaScript(null));
    +        assertEquals("8lvc1u+6B#-I", StringEscapeUtils.unescapeEcmaScript("8lvc1u+6B#-I"));
    +        assertEquals("<script src=\"build/main.bundle.js\"></script>",
    +                StringEscapeUtils.unescapeEcmaScript("<script src=\"build/main.bundle.js\"></script>")
    +        );
    +        assertEquals("<script src=\"build/main.bundle.js\"></script>>",
    +                StringEscapeUtils.unescapeEcmaScript("<script src=\"build/main.bundle.js\"></script>>")
    +        );
    +    }
    +
    +    @Test
    +    public void testEscapeHtmlFour() {
    +        assertNull("Should be null.", StringEscapeUtils.escapeHtml3(null));
    +        assertEquals("a", StringEscapeUtils.escapeHtml3("a"));
    +        assertEquals("&lt;b&gt;a", StringEscapeUtils.escapeHtml3("<b>a"));
    +    }
    +
    +    @Test
    +    public void testUnescapeJson() {
    +
    +        String jsonString = "{\"age\":100,\"name\":\"kyong.com\n\",\"messages\":[\"msg 1\",\"msg 2\",\"msg 3\"]}";
    +
    +        assertEquals("", StringEscapeUtils.unescapeJson(""));
    +        assertEquals(" ", StringEscapeUtils.unescapeJson(" "));
    +        assertEquals("a:b", StringEscapeUtils.unescapeJson("a:b"));
    +        assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
    +    }
    +
    +    @Ignore("Bug found.")
    +    @Test
    +    public void testUnescapeJsonFoundBug() {
    --- End diff --
   
    Thanks for the pull request!
   
    It would be nice if you could raise an isssue at https://issues.apache.org/jira/projects/TEXT for this.
   
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text pull request #60: additional-tests

kinow
In reply to this post by kinow
Github user TheRealHaui commented on a diff in the pull request:

    https://github.com/apache/commons-text/pull/60#discussion_r130609309
 
    --- Diff: src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java ---
    @@ -592,4 +593,43 @@ public void testUnscapeXSI() {
             assertEquals("", unescapeXSI("\\"));
         }
     
    +    @Test
    +    public void testUnescapeEcmaScript() {
    +        assertNull("Should be null.", StringEscapeUtils.unescapeEcmaScript(null));
    +        assertEquals("8lvc1u+6B#-I", StringEscapeUtils.unescapeEcmaScript("8lvc1u+6B#-I"));
    +        assertEquals("<script src=\"build/main.bundle.js\"></script>",
    +                StringEscapeUtils.unescapeEcmaScript("<script src=\"build/main.bundle.js\"></script>")
    +        );
    +        assertEquals("<script src=\"build/main.bundle.js\"></script>>",
    +                StringEscapeUtils.unescapeEcmaScript("<script src=\"build/main.bundle.js\"></script>>")
    +        );
    +    }
    +
    +    @Test
    +    public void testEscapeHtmlFour() {
    +        assertNull("Should be null.", StringEscapeUtils.escapeHtml3(null));
    +        assertEquals("a", StringEscapeUtils.escapeHtml3("a"));
    +        assertEquals("&lt;b&gt;a", StringEscapeUtils.escapeHtml3("<b>a"));
    +    }
    +
    +    @Test
    +    public void testUnescapeJson() {
    +
    +        String jsonString = "{\"age\":100,\"name\":\"kyong.com\n\",\"messages\":[\"msg 1\",\"msg 2\",\"msg 3\"]}";
    +
    +        assertEquals("", StringEscapeUtils.unescapeJson(""));
    +        assertEquals(" ", StringEscapeUtils.unescapeJson(" "));
    +        assertEquals("a:b", StringEscapeUtils.unescapeJson("a:b"));
    +        assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
    +    }
    +
    +    @Ignore("Bug found.")
    +    @Test
    +    public void testUnescapeJsonFoundBug() {
    --- End diff --
   
    Done.
    See https://issues.apache.org/jira/browse/TEXT-100.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text issue #60: additional-tests

kinow
In reply to this post by kinow
Github user TheRealHaui commented on the issue:

    https://github.com/apache/commons-text/pull/60
 
    Rechecked for blank lines and removed them.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text issue #60: additional-tests

kinow
In reply to this post by kinow
Github user coveralls commented on the issue:

    https://github.com/apache/commons-text/pull/60
 
   
    [![Coverage Status](https://coveralls.io/builds/12639540/badge)](https://coveralls.io/builds/12639540)
   
    Coverage increased (+0.3%) to 98.489% when pulling **fd33b1cbbc7e1188ebe2b1580606d5d1dbb12329 on TheRealHaui:additional-tests** into **998764ebe38113eb51e6850058ca01936625dd92 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text pull request #60: additional-tests

kinow
In reply to this post by kinow
Github user PascalSchumacher commented on a diff in the pull request:

    https://github.com/apache/commons-text/pull/60#discussion_r130633380
 
    --- Diff: src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java ---
    @@ -592,4 +593,43 @@ public void testUnscapeXSI() {
             assertEquals("", unescapeXSI("\\"));
         }
     
    +    @Test
    +    public void testUnescapeEcmaScript() {
    +        assertNull("Should be null.", StringEscapeUtils.unescapeEcmaScript(null));
    +        assertEquals("8lvc1u+6B#-I", StringEscapeUtils.unescapeEcmaScript("8lvc1u+6B#-I"));
    +        assertEquals("<script src=\"build/main.bundle.js\"></script>",
    +                StringEscapeUtils.unescapeEcmaScript("<script src=\"build/main.bundle.js\"></script>")
    +        );
    +        assertEquals("<script src=\"build/main.bundle.js\"></script>>",
    +                StringEscapeUtils.unescapeEcmaScript("<script src=\"build/main.bundle.js\"></script>>")
    +        );
    +    }
    +
    +    @Test
    +    public void testEscapeHtmlFour() {
    +        assertNull("Should be null.", StringEscapeUtils.escapeHtml3(null));
    +        assertEquals("a", StringEscapeUtils.escapeHtml3("a"));
    +        assertEquals("&lt;b&gt;a", StringEscapeUtils.escapeHtml3("<b>a"));
    +    }
    +
    +    @Test
    +    public void testUnescapeJson() {
    +
    +        String jsonString = "{\"age\":100,\"name\":\"kyong.com\n\",\"messages\":[\"msg 1\",\"msg 2\",\"msg 3\"]}";
    +
    +        assertEquals("", StringEscapeUtils.unescapeJson(""));
    +        assertEquals(" ", StringEscapeUtils.unescapeJson(" "));
    +        assertEquals("a:b", StringEscapeUtils.unescapeJson("a:b"));
    +        assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
    +    }
    +
    +    @Ignore("Bug found.")
    +    @Test
    +    public void testUnescapeJsonFoundBug() {
    --- End diff --
   
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text pull request #60: additional-tests

kinow
In reply to this post by kinow
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-text/pull/60


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text issue #60: additional-tests

kinow
In reply to this post by kinow
Github user PascalSchumacher commented on the issue:

    https://github.com/apache/commons-text/pull/60
 
    Thanks! :+1:
   
    By the way: Feel free to raise a jira issue for anything you think that maybe be a bug (e.g. NullPointerExceptions).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] commons-text issue #60: additional-tests

kinow
In reply to this post by kinow
Github user TheRealHaui commented on the issue:

    https://github.com/apache/commons-text/pull/60
 
    You're welcome!
    Thought it would be preferred by comments.
    However, I will try to keep in mind.
    And be cautious what you wish. ;-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

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

Loading...