diff options
Diffstat (limited to 'tests/runner.py')
-rw-r--r-- | tests/runner.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index ecabe9eb..2a988f8c 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -369,6 +369,23 @@ if 'benchmark' not in sys.argv: ''' self.do_test(src, '*7*') + def test_globals(self): + src = ''' + #include <stdio.h> + + + char cache[256], *next = cache; + + int main() + { + cache[10] = 25; + next[20] = 51; + printf("*%d,%d*\\n", next[10], cache[20]); + return 0; + } + ''' + self.do_test(src, '*25,51*') + def test_linked_list(self): src = ''' #include <stdio.h> |