A new user interface for you! Read more...

File 0398-Test-for-lists-that-aren-t-well-defined.patch of Package erlang

From 3e9d91db52c3be046be13f2a5e6330a1509e30fc Mon Sep 17 00:00:00 2001
From: Simon Cornish <zl9d97p02@sneakemail.com>
Date: Tue, 14 Aug 2018 21:42:28 -0700
Subject: [PATCH 1/2] Test for lists that aren't well defined

---
 lib/erl_interface/test/erl_ext_SUITE_data/ext_test.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/erl_interface/test/erl_ext_SUITE_data/ext_test.c b/lib/erl_interface/test/erl_ext_SUITE_data/ext_test.c
index 1e986feacf..04e8ca322e 100644
--- a/lib/erl_interface/test/erl_ext_SUITE_data/ext_test.c
+++ b/lib/erl_interface/test/erl_ext_SUITE_data/ext_test.c
@@ -88,6 +88,11 @@ TESTCASE(compare_list) {
     // erlang:term_to_binary([0, 1000])
     unsigned char term4[] = {131,108,0,0,0,2,97,0,98,0,0,3,232,106};
 
+    // erlang:term_to_binary([a|b])
+    unsigned char term5a[] = {131,108,0,0,0,1,100,0,1,97,100,0,1,98};
+    // erlang:term_to_binary([a|c])
+    unsigned char term5b[] = {131,108,0,0,0,1,100,0,1,97,100,0,1,99};
+
     erl_init(NULL, 0);
     start_a = term1;
     start_b = term2;
@@ -103,6 +108,13 @@ TESTCASE(compare_list) {
 
     test_compare_ext("lists1", start_a, end_a, start_b, end_b, -1);
 
+    start_a = term5a;
+    start_b = term5b;
+    end_a   = term5a + sizeof(term5a);
+    end_b   = term5b + sizeof(term5b);
+
+    test_compare_ext("lists5", start_a, end_a, start_b, end_b, -1);
+
     report(1);
 }
 
-- 
2.16.4