From 30d5fe46b55ac12158cd3076b6b4cd131a50b059 Mon Sep 17 00:00:00 2001 From: Vincent COUVERT Date: Mon, 1 Jun 2015 16:09:52 +0200 Subject: [PATCH] Add non-regression test for bug #9669. No item added to CHANGES since never released. Change-Id: I8427b8386e748e82f5a135b093717866d889c860 --- .../tests/nonreg_tests/bug_9669.dia.ref | 23 +++++++++++++++++ .../tests/nonreg_tests/bug_9669.tst | 27 ++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 scilab/modules/data_structures/tests/nonreg_tests/bug_9669.dia.ref create mode 100644 scilab/modules/data_structures/tests/nonreg_tests/bug_9669.tst diff --git a/scilab/modules/data_structures/tests/nonreg_tests/bug_9669.dia.ref b/scilab/modules/data_structures/tests/nonreg_tests/bug_9669.dia.ref new file mode 100644 index 0000000..415e75d --- /dev/null +++ b/scilab/modules/data_structures/tests/nonreg_tests/bug_9669.dia.ref @@ -0,0 +1,23 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2015 - Scilab Enterprises - Vincent COUVERT +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- Non-regression test for bug 9669 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/9669 +// +// <-- Short Description --> +// Referencing a struct from itself will segfault. +// Without copy +st.a = 1; +st.b = st; +// With copy +clear st +st.a = 1; +stsave=st; +st.b = st; +assert_checkequal(st.b, stsave); diff --git a/scilab/modules/data_structures/tests/nonreg_tests/bug_9669.tst b/scilab/modules/data_structures/tests/nonreg_tests/bug_9669.tst new file mode 100644 index 0000000..42631c7 --- /dev/null +++ b/scilab/modules/data_structures/tests/nonreg_tests/bug_9669.tst @@ -0,0 +1,27 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2015 - Scilab Enterprises - Vincent COUVERT +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// <-- Non-regression test for bug 9669 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/9669 +// +// <-- Short Description --> +// Referencing a struct from itself will segfault. + +// Without copy +st.a = 1; +st.b = st; + +// With copy +clear st +st.a = 1; +stsave=st; +st.b = st; +assert_checkequal(st.b, stsave); -- 1.7.9.5