xset: help page only 'fpf' + equivalences
[scilab.git] / scilab / modules / graphics / tests / unit_tests / xset_xget.tst
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2011 - Scilab Enterprises - Bruno JOFRET
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7
8 // <-- TEST WITH GRAPHIC -->
9 // <-- NO CHECK REF -->
10
11 // test xset and xget
12
13 // font
14 out = xget("font");
15 assert_checkequal(out, [6 1]);
16
17 // font size
18 out = xget("font size");
19 assert_checkequal(out, 1);
20
21 // fpf
22 out = xget("fpf");
23 assert_checkequal(out, "");
24 xset("fpf", "%s.%s");
25 out = xget("fpf");
26 assert_checkequal(out, "%s.%s");
27
28 // auto clear
29 out = xget("auto clear");
30 assert_checkequal(out, "off");
31
32 // dashes
33 out = xget("dashes");
34 assert_checkequal(out, 1);
35 xset("dashes", 2);
36 out = xget("dashes");
37 assert_checkequal(out, 2);
38
39 // hidden3d
40 out = xget("hidden3d");
41 assert_checkequal(out, 4);
42
43 // window figure
44 f = gcf();
45 out = xget("window");
46 assert_checkequal(out, f.figure_id);
47 out = xget("figure");
48 assert_checkequal(out, f.figure_id);
49
50 // wdim wpdim
51 out = xget("wdim");
52 assert_checkequal(out, f.figure_size);
53 out = xget("wpdim");
54 assert_checkequal(out, f.figure_size);
55
56 // wpos
57 out = xget("wpos");
58 assert_checkequal(out, f.figure_position);
59
60 // viewport
61 out = xget("viewport");
62 assert_checkequal(out, f.viewport);
63
64 // background
65 out = xget("background");
66 assert_checkequal(out, -2);
67
68 // color foreground pattern
69 out = xget("color");
70 assert_checkequal(out, -1);
71 out = xget("foreground");
72 assert_checkequal(out, -1);
73 out = xget("pattern");
74 assert_checkequal(out, -1);
75
76 // lastpattern
77 out = xget("lastpattern");
78 assert_checkequal(out, 32);
79
80 // line mode
81 out = xget("line mode");
82 assert_checkequal(out, 1);
83
84 // white
85 out = xget("white");
86 assert_checkequal(out, 34);
87
88 // wresize
89 out = xget("wresize");
90 assert_checkequal(out, 1);
91
92 // clipgrf
93 out = xget("clipgrf");
94 assert_checkequal(out, 0);
95
96 // clipoff
97 out = xget("clipoff");
98 assert_checkequal(out, 1);
99
100 // XSET
101 ierr = execstr("xset(""fpf"");","errcatch");
102 assert_checkequal(ierr, 77);