~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/graphics/tests/nonreg_tests/bug_11411.tst

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// =============================================================================
 
2
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 
3
// Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS
 
4
//
 
5
//  This file is distributed under the same license as the Scilab package.
 
6
// =============================================================================
 
7
// <-- TEST WITH GRAPHIC -->
 
8
//
 
9
// <-- Non-regression test for bug 11411 -->
 
10
//
 
11
// <-- Bugzilla URL -->
 
12
// http://bugzilla.scilab.org/show_bug.cgi?id=11411
 
13
//
 
14
// <-- Short Description -->
 
15
//  save function used unsigned char to store length of string, now it is an integer
 
16
 
 
17
oldMode = warning('query');
 
18
warning("off");
 
19
longstring = strcat(mgetl("SCI/COPYING-BSD")); //1639
 
20
 
 
21
//"figure".info_message
 
22
//"figure".igure_name
 
23
f = gcf();
 
24
f.info_message = longstring;
 
25
f.figure_name = longstring;
 
26
save(TMPDIR + "/savef.dat", f);
 
27
delete(f);
 
28
clear f;
 
29
load(TMPDIR + "/savef.dat");
 
30
assert_checkequal(f.info_message, longstring);
 
31
assert_checkequal(f.figure_name, longstring);
 
32
delete(f);
 
33
clear f;
 
34
 
 
35
//"uimenu".callback
 
36
m = uimenu(gcf(),'label', 'test', 'callback', longstring); //no sense, just for test !
 
37
save(TMPDIR + "/savef.dat", m);
 
38
delete(gcf());
 
39
clear m;
 
40
load(TMPDIR + "/savef.dat");
 
41
assert_checkequal(m.callback, longstring);
 
42
delete(gcf());
 
43
clear m;
 
44
 
 
45
//"uicontrol".String
 
46
//"uicontrol".callback
 
47
m = uicontrol(gcf(), "Style", "text", "string",longstring, "callback", longstring);
 
48
save(TMPDIR + "/savef.dat", m);
 
49
delete(gcf());
 
50
clear m;
 
51
load(TMPDIR + "/savef.dat");
 
52
assert_checkequal(m.callback, longstring);
 
53
assert_checkequal(m.string, longstring);
 
54
delete(gcf());
 
55
clear m;
 
56
warning(oldMode);
 
57