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/01/01 03:05:59 UTC
[commons-io] branch master updated: Tests that we do get a copy.
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 2c1418d Tests that we do get a copy.
2c1418d is described below
commit 2c1418d701fa74b60eb824ab4d48384d9d9cddfb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Dec 31 22:05:53 2020 -0500
Tests that we do get a copy.
---
src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java b/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java
index 6c9a540..0d4ee22 100644
--- a/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java
+++ b/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java
@@ -80,6 +80,8 @@ public class ByteOrderMarkTestCase {
@Test
public void getBytes() {
assertTrue(Arrays.equals(TEST_BOM_1.getBytes(), new byte[] {(byte)1}), "test1 bytes");
+ TEST_BOM_1.getBytes()[0] = 2;
+ assertTrue(Arrays.equals(TEST_BOM_1.getBytes(), new byte[] {(byte)1}), "test1 bytes");
assertTrue(Arrays.equals(TEST_BOM_2.getBytes(), new byte[] {(byte)1, (byte)2}), "test1 bytes");
assertTrue(Arrays.equals(TEST_BOM_3.getBytes(), new byte[] {(byte)1, (byte)2, (byte)3}), "test1 bytes");
}