Skip to content

Commit 4f755ed

Browse files
committed
Test more posible index values.
1 parent f32fba4 commit 4f755ed

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

testsuite/tests/index.bas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ A$="TEST.STRING INDEXING"
1212
? A$[2]
1313
? A$[2,5]
1414
? A$[10]
15-
for i=1 to 22 : ? i, ">"; A$[i] ; "<" : next i
15+
? A$[1,256]
16+
for i=-1 to 22 : ? i, ">"; A$[i] ; "<" : next i
1617

1718
for i=1 to 22 : ? i, ">"; A$[i,2] ; "<" : next i
1819

19-
for i=0 to 22 : ? i, ">"; A$[2,i] ; "<" : next i
20+
for i=-1 to 22 : ? i, ">"; A$[2,i] ; "<" : next i
2021

2122
for i=1 to 20 : ? i, i*i, str$(i*i)[2,1] : next i
2223

testsuite/tests/index.chk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ TEST.
1111
EST.STRING INDEXING
1212
EST.S
1313
NG INDEXING
14+
TEST.STRING INDEXING
15+
-1 ><
16+
0 ><
1417
1 >TEST.STRING INDEXING<
1518
2 >EST.STRING INDEXING<
1619
3 >ST.STRING INDEXING<
@@ -55,6 +58,7 @@ NG INDEXING
5558
20 >G<
5659
21 ><
5760
22 ><
61+
-1 ><
5862
0 ><
5963
1 >E<
6064
2 >ES<

0 commit comments

Comments
 (0)