[PATCH 2/5] test: improve test condition

Kris Van Hees <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <SJ0PR10MB5672EDF946CB1EFDE82D913FC22AA@SJ0PR10MB5672.namprd10.prod.outlook.com>
Test with content that could be interpreted as a string if the consumer
handles things wrong.

Signed-off-by: Kris Van Hees <[email protected]>
---
 test/unittest/actions/trace/tst.array.d | 10 +++++-----
 test/unittest/actions/trace/tst.array.r |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/unittest/actions/trace/tst.array.d b/test/unittest/actions/trace/tst.array.d
index 9e0c410f9..e74c155cf 100644
--- a/test/unittest/actions/trace/tst.array.d
+++ b/test/unittest/actions/trace/tst.array.d
@@ -6,7 +6,7 @@
  */
 
 /*
- * ASSERTION: The trace() action prints an array correctly.
+ * ASSERTION: The trace() action prints a non-char array correctly as raw bytes.
  *
  * SECTION: Actions and Subroutines/trace()
  */
@@ -15,10 +15,10 @@ short n[5];
 
 BEGIN
 {
-	n[0] = 0x1234;
-	n[1] = 0x5678;
-	n[2] = 0x0000;
-	n[3] = 0x8765;
+	n[0] = 0x7464;
+	n[1] = 0x6172;
+	n[2] = 0x6563;
+	n[3] = 0x1234;
 	n[4] = 0x4321;
 	trace(n);
 	exit(0);
diff --git a/test/unittest/actions/trace/tst.array.r b/test/unittest/actions/trace/tst.array.r
index 52ff28ecd..90c6a2236 100644
--- a/test/unittest/actions/trace/tst.array.r
+++ b/test/unittest/actions/trace/tst.array.r
@@ -1,7 +1,7 @@
                    FUNCTION:NAME
                           :BEGIN 
              0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
-         0: 34 12 78 56 00 00 65 87 21 43                    4.xV..e.!C
+         0: 64 74 72 61 63 65 34 12 21 43                    dtrace4.!C
 
 
 -- @@stderr --
-- 
2.45.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.