@@ -2815,7 +2815,7 @@ public void testReadFileToString_IOExceptionOnPosixFileSystem() throws Exception
28152815 @ Test
28162816 public void testReadFileToStringWithDefaultEncoding () throws Exception {
28172817 final File file = new File (tempDirFile , "read.obj" );
2818- final String fixture = "Hello / u1234" ;
2818+ final String fixture = "Hello \ u1234 " ;
28192819 Files .write (file .toPath (), fixture .getBytes ());
28202820
28212821 assertEquals (fixture , FileUtils .readFileToString (file ));
@@ -2824,18 +2824,18 @@ public void testReadFileToStringWithDefaultEncoding() throws Exception {
28242824 @ Test
28252825 public void testReadFileToStringWithEncoding () throws Exception {
28262826 final File file = new File (tempDirFile , "read.obj" );
2827- final byte [] text = "Hello / u1234" .getBytes (StandardCharsets .UTF_8 );
2827+ final byte [] text = "Hello \ u1234 " .getBytes (StandardCharsets .UTF_8 );
28282828 Files .write (file .toPath (), text );
28292829
28302830 final String data = FileUtils .readFileToString (file , "UTF8" );
2831- assertEquals ("Hello / u1234" , data );
2831+ assertEquals ("Hello \ u1234 " , data );
28322832 }
28332833
28342834 @ Test
28352835 public void testReadLines () throws Exception {
28362836 final File file = TestUtils .newFile (tempDirFile , "lines.txt" );
28372837 try {
2838- final String [] data = {"hello" , "/ u1234" , "" , "this is" , "some text" };
2838+ final String [] data = {"hello" , "\ u1234 " , "" , "this is" , "some text" };
28392839 TestUtils .createLineFileUtf8 (file , data );
28402840
28412841 final List <String > lines = FileUtils .readLines (file , UTF_8 );
@@ -3270,16 +3270,16 @@ public void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_Sh
32703270 @ Test
32713271 public void testWriteCharSequence1 () throws Exception {
32723272 final File file = new File (tempDirFile , "write.txt" );
3273- FileUtils .write (file , "Hello / u1234" , "UTF8" );
3274- final byte [] text = "Hello / u1234" .getBytes (StandardCharsets .UTF_8 );
3273+ FileUtils .write (file , "Hello \ u1234 " , "UTF8" );
3274+ final byte [] text = "Hello \ u1234 " .getBytes (StandardCharsets .UTF_8 );
32753275 TestUtils .assertEqualContent (text , file );
32763276 }
32773277
32783278 @ Test
32793279 public void testWriteCharSequence2 () throws Exception {
32803280 final File file = new File (tempDirFile , "write.txt" );
3281- FileUtils .write (file , "Hello / u1234" , (String ) null );
3282- final byte [] text = "Hello / u1234" .getBytes ();
3281+ FileUtils .write (file , "Hello \ u1234 " , (String ) null );
3282+ final byte [] text = "Hello \ u1234 " .getBytes ();
32833283 TestUtils .assertEqualContent (text , file );
32843284 }
32853285
@@ -3489,8 +3489,8 @@ public void testWriteStringToFile_WithAppendOptionTrue_ShouldNotDeletePreviousFi
34893489 @ Test
34903490 public void testWriteStringToFileIntoNonExistentSubdir () throws Exception {
34913491 final File file = new File (tempDirFile , "subdir/write.txt" );
3492- FileUtils .writeStringToFile (file , "Hello / u1234" , (Charset ) null );
3493- final byte [] text = "Hello / u1234" .getBytes ();
3492+ FileUtils .writeStringToFile (file , "Hello \ u1234 " , (Charset ) null );
3493+ final byte [] text = "Hello \ u1234 " .getBytes ();
34943494 TestUtils .assertEqualContent (text , file );
34953495 }
34963496
@@ -3505,16 +3505,16 @@ public void testWriteStringToFileIntoNonExistentSubdir() throws Exception {
35053505 public void testWriteStringToFileIntoSymlinkedDir () throws Exception {
35063506 final Path symlinkDir = createTempSymbolicLinkedRelativeDir ().getLeft ();
35073507 final File file = symlinkDir .resolve ("file" ).toFile ();
3508- FileUtils .writeStringToFile (file , "Hello / u1234" , StandardCharsets .UTF_8 );
3509- final byte [] text = "Hello / u1234" .getBytes ();
3508+ FileUtils .writeStringToFile (file , "Hello \ u1234 " , StandardCharsets .UTF_8 );
3509+ final byte [] text = "Hello \ u1234 " .getBytes ();
35103510 TestUtils .assertEqualContent (text , file );
35113511 }
35123512
35133513 @ Test
35143514 public void testWriteStringToFileWithCharset () throws Exception {
35153515 final File file = new File (tempDirFile , "write.txt" );
3516- FileUtils .writeStringToFile (file , "Hello / u1234" , "UTF8" );
3517- final byte [] text = "Hello / u1234" .getBytes (StandardCharsets .UTF_8 );
3516+ FileUtils .writeStringToFile (file , "Hello \ u1234 " , "UTF8" );
3517+ final byte [] text = "Hello \ u1234 " .getBytes (StandardCharsets .UTF_8 );
35183518 TestUtils .assertEqualContent (text , file );
35193519 }
35203520
@@ -3546,16 +3546,16 @@ public void testWriteStringToFileWithEncoding_WithAppendOptionTrue_ShouldNotDele
35463546 @ Test
35473547 public void testWriteStringToFileWithNullCharset () throws Exception {
35483548 final File file = new File (tempDirFile , "write.txt" );
3549- FileUtils .writeStringToFile (file , "Hello / u1234" , (Charset ) null );
3550- final byte [] text = "Hello / u1234" .getBytes ();
3549+ FileUtils .writeStringToFile (file , "Hello \ u1234 " , (Charset ) null );
3550+ final byte [] text = "Hello \ u1234 " .getBytes ();
35513551 TestUtils .assertEqualContent (text , file );
35523552 }
35533553
35543554 @ Test
35553555 public void testWriteStringToFileWithNullStringCharset () throws Exception {
35563556 final File file = new File (tempDirFile , "write.txt" );
3557- FileUtils .writeStringToFile (file , "Hello / u1234" , (String ) null );
3558- final byte [] text = "Hello / u1234" .getBytes ();
3557+ FileUtils .writeStringToFile (file , "Hello \ u1234 " , (String ) null );
3558+ final byte [] text = "Hello \ u1234 " .getBytes ();
35593559 TestUtils .assertEqualContent (text , file );
35603560 }
35613561
0 commit comments