summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-05-12 11:16:46 +0200
committerClément DAVID <clement.david@scilab.org>2010-05-18 15:24:53 +0200
commitbca8f927b6e37b2fe01590b1cca118c6b821ad54 (patch)
tree9913888df7d5d94f94b212a72be9bca25d007baa /scilab/modules
parent6a839c07a973171c966b25aa9d1480e0e34b7234 (diff)
downloadscilab-bca8f927b6e37b2fe01590b1cca118c6b821ad54.zip
scilab-bca8f927b6e37b2fe01590b1cca118c6b821ad54.tar.gz
update test bug_4968
Change-Id: I21c081d7f9408ddb06fe494ed646e61aceec686a
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_4968.dia.ref17
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_4968.tst56
2 files changed, 40 insertions, 33 deletions
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_4968.dia.ref b/scilab/modules/functions/tests/nonreg_tests/bug_4968.dia.ref
index 36ab645..cd7b9b6 100644
--- a/scilab/modules/functions/tests/nonreg_tests/bug_4968.dia.ref
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_4968.dia.ref
@@ -1,9 +1,12 @@
1// ============================================================================= 1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2009 - DIGITEO - Allan CORNET 3// Copyright (C) 2009 - 2010 - DIGITEO - Allan CORNET
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7//
8// <-- JVM NOT MANDATORY -->
9//
7// <-- Non-regression test for bug 4968 --> 10// <-- Non-regression test for bug 4968 -->
8// 11//
9// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
@@ -14,12 +17,14 @@
14// ============================================================================= 17// =============================================================================
15URL = "http://www.scilab.org/abc.htm"; 18URL = "http://www.scilab.org/abc.htm";
16// ============================================================================= 19// =============================================================================
17tmp = strsubst(URL,"//","§"); 20tmp = strsubst(URL, "//", "§");
18if tmp <> "http:§www.scilab.org/abc.htm" then bugmes();quit;end 21if tmp <> "http:§www.scilab.org/abc.htm" then bugmes();quit;end
19// ============================================================================= 22// =============================================================================
20i = strcspn(tmp,"/"); 23i = strcspn(tmp, "/");
21if i <> 21 then bugmes();quit;end 24if length("http:§www.scilab.org") <> 20 then bugmes();quit;end
25if i <> 20 then bugmes();quit;end
22// ============================================================================= 26// =============================================================================
23server = strsubst(part(tmp,1:i),"§","//"); 27server = strsubst(part(tmp, 1:i), "§", "//");
24if server <> 'http://www.scilab.org/' then bugmes();quit;end 28if part(tmp, 1:i) <> 'http:§www.scilab.org' then bugmes();quit;end
29if server <> 'http://www.scilab.org' then bugmes();quit;end
25// ============================================================================= 30// =============================================================================
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_4968.tst b/scilab/modules/functions/tests/nonreg_tests/bug_4968.tst
index 58ba6f5..c723644 100644
--- a/scilab/modules/functions/tests/nonreg_tests/bug_4968.tst
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_4968.tst
@@ -1,28 +1,30 @@
1// ============================================================================= 1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2009 - DIGITEO - Allan CORNET 3// Copyright (C) 2009 - 2010 - DIGITEO - Allan CORNET
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7//
8// <-- JVM NOT MANDATORY --> 8// <-- JVM NOT MANDATORY -->
9 9//
10// <-- Non-regression test for bug 4968 --> 10// <-- Non-regression test for bug 4968 -->
11// 11//
12// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=4968 13// http://bugzilla.scilab.org/show_bug.cgi?id=4968
14// 14//
15// <-- Short Description --> 15// <-- Short Description -->
16// part() or strsubst() problem with UTF-8 when exec ??? 16// part() or strsubst() problem with UTF-8 when exec ???
17// ============================================================================= 17// =============================================================================
18URL = "http://www.scilab.org/abc.htm"; 18URL = "http://www.scilab.org/abc.htm";
19// ============================================================================= 19// =============================================================================
20tmp = strsubst(URL,"//","§"); 20tmp = strsubst(URL, "//", "§");
21if tmp <> "http:§www.scilab.org/abc.htm" then pause,end 21if tmp <> "http:§www.scilab.org/abc.htm" then pause,end
22// ============================================================================= 22// =============================================================================
23i = strcspn(tmp,"/"); 23i = strcspn(tmp, "/");
24if i <> 21 then pause,end 24if length("http:§www.scilab.org") <> 20 then pause, end
25// ============================================================================= 25if i <> 20 then pause,end
26server = strsubst(part(tmp,1:i),"§","//"); 26// =============================================================================
27if server <> 'http://www.scilab.org/' then pause,end 27server = strsubst(part(tmp, 1:i), "§", "//");
28// ============================================================================= \ No newline at end of file 28if part(tmp, 1:i) <> 'http:§www.scilab.org' then pause, end
29if server <> 'http://www.scilab.org' then pause, end
30// =============================================================================