From 66079c4aaf6f20f30637b939e65e60ae8e88a353 Mon Sep 17 00:00:00 2001 From: Paul Bignier Date: Tue, 18 Mar 2014 17:22:47 +0100 Subject: [PATCH] Xcos tests: Minor fix Redefine messagebox() to avoid popup. Change-Id: I413fc8c1343010212e5750c27982b9c352ec8f77 --- .../xcos/tests/nonreg_tests/bug_11975.dia.ref | 8 +++++++- .../modules/xcos/tests/nonreg_tests/bug_11975.tst | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_11975.dia.ref b/scilab/modules/xcos/tests/nonreg_tests/bug_11975.dia.ref index 295b169..a800060 100644 --- a/scilab/modules/xcos/tests/nonreg_tests/bug_11975.dia.ref +++ b/scilab/modules/xcos/tests/nonreg_tests/bug_11975.dia.ref @@ -21,7 +21,7 @@ // - Hydraulics.zcos demonstration ilib_verbose(0); // Inverted_pendulum -if (~isdef("setw")) then +if (~isdef("setw")) then exec("SCI/modules/xcos/demos/setw.sci",-1) end assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/demos/Inverted_pendulum.zcos")); @@ -31,6 +31,12 @@ assert_checktrue(ok); assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/IF_block.zcos")); [cpr, ok] = xcos_compile(scs_m); assert_checktrue(ok); +// Redefining messagebox() to avoid popup +prot = funcprot(); +funcprot(0); +function messagebox(msg, msg_title) +endfunction +funcprot(prot); // Hydraulics assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos")); [cpr, ok] = xcos_compile(scs_m); diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_11975.tst b/scilab/modules/xcos/tests/nonreg_tests/bug_11975.tst index a768b8a..9a6aee1 100644 --- a/scilab/modules/xcos/tests/nonreg_tests/bug_11975.tst +++ b/scilab/modules/xcos/tests/nonreg_tests/bug_11975.tst @@ -25,7 +25,7 @@ ilib_verbose(0); // Inverted_pendulum -if (~isdef("setw")) then +if (~isdef("setw")) then exec("SCI/modules/xcos/demos/setw.sci",-1) end assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/demos/Inverted_pendulum.zcos")); @@ -37,6 +37,13 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/IF_block.zcos")); [cpr, ok] = xcos_compile(scs_m); assert_checktrue(ok); +// Redefining messagebox() to avoid popup +prot = funcprot(); +funcprot(0); +function messagebox(msg, msg_title) +endfunction +funcprot(prot); + // Hydraulics assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos")); [cpr, ok] = xcos_compile(scs_m); -- 1.7.9.5