- Timestamp:
- 11/04/08 17:59:25 (2 months ago)
- Files:
-
- 1 modified
-
t/spec/S03-operators/context-forcers.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S03-operators/context-forcers.t
r22450 r22870 3 3 use Test; 4 4 5 plan 8 1;5 plan 87; 6 6 7 7 { # L<S03/"Changes to Perl 5 operators"/imposes boolean context/> … … 179 179 is(int($c), 1, 'float numbers forced into integer context are 0'); 180 180 } 181 182 { 183 my $x = [0, 100, 280, 33, 400, 5665]; 184 185 is (@($x)[1], 100, '@$x works'); 186 187 is (@($x)[3]+50, 83, '@$x works inside a larger expression'); 188 189 my $y = [601, 700, 888]; 190 191 my @total = (@$x, @$y); 192 193 is (@total[0], 0, "total[0] is 0"); 194 is (@total[1], 100, "total[1] is 100"); 195 is (@total[6], 601, "total[1] is 100"); 196 is (@total[8], 888, "total[1] is 100"); 197 } 198
