summaryrefslogtreecommitdiffstats
path: root/scilab/modules/data_structures/tests/nonreg_tests/bug_9218.dia.ref
blob: 77f95544e02848d39dded4dddb0937f7a07c1c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// =============================================================================
// 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 9218 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/9218
//
// <-- Short Description -->
// a("b") = 10 makes Scilab crash 
// but a = struct(); a("b") = 10 works.
clear a
a("b") = 10;
assert_checkequal(a.b, 10);
clear a
a.b = 10;
assert_checkequal(a.b, 10);
clear a
a = struct();
a("b") = 10;
assert_checkequal(a.b, 10);