1//<-- CLI SHELL MODE -->
2// =============================================================================
3// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4// Copyright (C) 2006-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
5//
6//  This file is distributed under the same license as the Scilab package.
7// =============================================================================
8// <-- Non-regression test for bug 623 -->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/show_bug.cgi?id=623
12//
13// <-- Short Description -->
14//    Even after applying the patch corresponding to bug report
15//    608, integer cast to boolean is still not perfect.
16uno =  int8(1);
171   == [uno uno];
18if or(1<>[uno uno])     then bugmes();quit;end
19if or([1 1]<>[uno uno]) then bugmes();quit;end
20if or([uno uno]<>1)     then bugmes();quit;end
21if or([uno uno]<>[1 1]) then bugmes();quit;end
22if execstr("uint8(1) & %t"   ,"errcatch")  <> 0 then bugmes();quit;end
23if execstr("%t & uint8(1)"   ,"errcatch")  <> 0 then bugmes();quit;end
24if execstr("int32(1) & %t"   ,"errcatch")  <> 0 then bugmes();quit;end
25if execstr("%t & int32(1)"   ,"errcatch")  <> 0 then bugmes();quit;end
26if execstr("uint32(1) & %t"  ,"errcatch")  <> 0 then bugmes();quit;end
27if execstr("%t & uint32(1)"  ,"errcatch")  <> 0 then bugmes();quit;end
28if execstr("int16(1) & %t"   ,"errcatch")  <> 0 then bugmes();quit;end
29if execstr("%t & int16(1)"   ,"errcatch")  <> 0 then bugmes();quit;end
30if execstr("int8(1) & %f "   ,"errcatch")  <> 0 then bugmes();quit;end
31if execstr("%t & int8(1)"    ,"errcatch")  <> 0 then bugmes();quit;end
32