This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c8dabf7f Fix bug in test fixture
9c8dabf7f is described below

commit 9c8dabf7f4da273707118893053851c8010ebc9a
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Feb 19 15:00:21 2025 -0500

    Fix bug in test fixture
    
    Add another Unicode test fixture
---
 src/test/java/org/apache/commons/io/IOUtilsTest.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/io/IOUtilsTest.java 
b/src/test/java/org/apache/commons/io/IOUtilsTest.java
index b26be27e6..6ef0171b8 100644
--- a/src/test/java/org/apache/commons/io/IOUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/IOUtilsTest.java
@@ -1020,7 +1020,7 @@ public void testReadLines_CharSequence() throws 
IOException {
         final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
         CharSequence csq = null;
         try {
-            final String[] data = {"hello", "/u1234", "", "this is", "some 
text"};
+            final String[] data = {"hello", "\u1234", "", "this is", "some 
text"};
             TestUtils.createLineFileUtf8(file, data);
             csq = new String(Files.readAllBytes(file.toPath()), 
StandardCharsets.UTF_8);
             final List<String> lines = IOUtils.readLines(csq);
@@ -1035,7 +1035,7 @@ public void testReadLines_CharSequenceAsStringBuilder() 
throws IOException {
         final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
         StringBuilder csq = null;
         try {
-            final String[] data = {"hello", "/u1234", "", "this is", "some 
text"};
+            final String[] data = {"hello", "\u1234", "", "this is", "some 
text"};
             TestUtils.createLineFileUtf8(file, data);
             csq = new StringBuilder(new 
String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8));
             final List<String> lines = IOUtils.readLines(csq);
@@ -1068,9 +1068,8 @@ public void testReadLines_InputStream_String() throws 
Exception {
         final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
         InputStream in = null;
         try {
-            final String[] data = {"hello", "/u1234", "", "this is", "some 
text"};
+            final String[] data = { "\u4f60\u597d", "hello", "\u1234", "", 
"this is", "some text" };
             TestUtils.createLineFileUtf8(file, data);
-
             in = Files.newInputStream(file.toPath());
             final List<String> lines = IOUtils.readLines(in, UTF_8);
             assertEquals(Arrays.asList(data), lines);
@@ -1086,7 +1085,7 @@ public void testReadLines_Reader() throws Exception {
         final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
         Reader in = null;
         try {
-            final String[] data = {"hello", "/u1234", "", "this is", "some 
text"};
+            final String[] data = {"hello", "\u1234", "", "this is", "some 
text"};
             TestUtils.createLineFileUtf8(file, data);
             in = new InputStreamReader(Files.newInputStream(file.toPath()));
             final List<String> lines = IOUtils.readLines(in);

Reply via email to