You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/09/16 12:59:52 UTC
[commons-io] branch master updated: Add missing test case.
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 8febcd1 Add missing test case.
8febcd1 is described below
commit 8febcd116820b805fade97271f07d87f64fd2ee3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 16 08:59:49 2021 -0400
Add missing test case.
---
src/test/java/org/apache/commons/io/FileUtilsTestCase.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
index 4c8c918..e6b5321 100644
--- a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -3073,6 +3073,14 @@ public class FileUtilsTestCase {
}
@Test
+ public void testWriteStringToFile4() throws Exception {
+ final File file = new File(temporaryFolder, "subdir/write.txt");
+ FileUtils.writeStringToFile(file, "Hello /u1234", (Charset) null);
+ final byte[] text = "Hello /u1234".getBytes();
+ TestUtils.assertEqualContent(text, file);
+ }
+
+ @Test
public void testWriteStringToFileWithEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
FileUtils.writeStringToFile(file, "This line was there before you...");