* Bug #9052 fixed - Some Demos in graphics were automatically closed at the end of... 84/14584/2
Charlotte HECQUET [Wed, 28 May 2014 13:03:43 +0000 (15:03 +0200)]
Change-Id: I4d63d2b7d3b910c2c184f4d48aa7c9ee64a64f95

scilab/CHANGES_5.5.X
scilab/modules/graphics/tests/nonreg_tests/bug_9052.dia.ref [new file with mode: 0644]
scilab/modules/graphics/tests/nonreg_tests/bug_9052.tst [new file with mode: 0644]

index f07b957..bd39ee0 100644 (file)
@@ -25,6 +25,9 @@ Scilab Bug Fixes
 
 * Bug #8898 fixed - Help page of getdate improved.
 
+* Bug #9052 fixed - Some demonstrations in graphics were automatically closed at
+                    the end of their execution.
+
 * Bug #10555 fixed - Scilab failed to build with some configure options.
 
 * Bug #10583 fixed - ./configure --without-xcos did not work.
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_9052.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_9052.dia.ref
new file mode 100644 (file)
index 0000000..cc3e751
--- /dev/null
@@ -0,0 +1,52 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Charlotte HECQUET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+// <-- Non-regression test for bug 9052 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9052
+//
+// <-- Short Description -->
+// All demos in graphics/animations are automatically closed at the end of each one
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim1","anim1.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim2","anim2.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim3","anim3.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim4","anim4.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim5","anim5.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim6","anim6.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim7","anim7.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim8","anim8.sci");
+exec(path_demo,-1);
+demo_riemann();
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","bubbleSort","bubbleSort.sci");
+exec(path_demo,-1);
+demo_bubbleSort();
+assert_checkequal(winsid(), 0);
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_9052.tst b/scilab/modules/graphics/tests/nonreg_tests/bug_9052.tst
new file mode 100644 (file)
index 0000000..c4aea83
--- /dev/null
@@ -0,0 +1,53 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Charlotte HECQUET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+// <-- Non-regression test for bug 9052 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9052
+//
+// <-- Short Description -->
+// All demos in graphics/animations are automatically closed at the end of each one
+
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim1","anim1.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim2","anim2.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim3","anim3.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim4","anim4.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim5","anim5.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim6","anim6.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim7","anim7.sce");
+exec(path_demo,-1);
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim8","anim8.sci");
+exec(path_demo,-1);
+demo_riemann();
+assert_checkequal(winsid(), 100001);
+xdel(winsid());
+path_demo = fullfile(SCI,"modules","graphics","demos","anim","bubbleSort","bubbleSort.sci");
+exec(path_demo,-1);
+demo_bubbleSort();
+assert_checkequal(winsid(), 0);