summaryrefslogtreecommitdiffstats
path: root/scilab/modules/completion/tests/nonreg_tests/bug_7123.tst
blob: d84b7e5af18282fdc67b5de0752853a9ecac2a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2010 - DIGITEO - Allan CORNET
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
//
// <-- JVM NOT MANDATORY -->
//
// <-- Non-regression test for bug 7123 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=7123
//
// <-- Short Description -->
// No completion was possible if the name of a variable is preceded by ~ or @ or < or >
// 

ilib_verbose(0);
ierr = exec(SCI+"/modules/completion/tests/utilities/build_primitives.sce","errcatch",-1);
if ierr <> 0 then pause, end
ierr = exec(SCI+"/modules/completion/tests/utilities/loader.sce","errcatch",-1);
if ierr <> 0 then pause, end

blahblah = %t;
ref = 'blahbl';

r = getpartlevel('if ~blahbl');
if r <> ref then pause, end;

r = getpartlevel('if @blahbl');
if r <> ref then pause, end;

r = getpartlevel('if %t==blahbl');
if r <> ref then pause, end;

r = getpartlevel('if %t == blahbl');
if r <> ref then pause, end;

blahblah = 3;

r = getpartlevel('if 2>blahbl');
if r <> ref then pause, end;

r = getpartlevel('if 2 > blahbl');
if r <> ref then pause,end;

r = getpartlevel('if 2<blahbl');
if r <> ref then pause,end;

r = getpartlevel('if 2 < blahbl');
if r <> ref then pause,end;

// tabulation used in editor not in console
r = getpartlevel(ascii(9) + 'blahbl');
if r <> ref then pause,end;