v2 / vlib / v / debug / tests / var_scope.expect
48 lines · 47 sloc · 1.08 KB · e12c8c1e201d851bc749c2c495fd72165103def1
Raw
1#!/usr/bin/env expect
2source "common.tcl"
3
4expect "Break on * main in ${test_file}:6"
5expect "${test_file}:6 vdbg> "
6send "scope\n"
7expect "a = 1 (int)"
8send "c\n"
9expect "Break on * main in ${test_file}:11"
10expect "${test_file}:11 vdbg> "
11send "scope\n"
12expect "e = 3 (int)"
13expect "a = 1 (int)"
14send "c\n"
15expect "Break on * main in ${test_file}:21"
16expect "${test_file}:21 vdbg> "
17send "scope\n"
18expect "x = 1 (int)"
19send "c\n"
20expect "Break on * main in ${test_file}:26"
21expect "${test_file}:26 vdbg> "
22send "scope\n"
23expect "a = 1 (int)"
24expect "b = 2 (int)"
25expect "x = 1 (int)"
26send "c\n"
27expect "Break on * main in ${test_file}:31"
28expect "${test_file}:31 vdbg> "
29send "scope\n"
30expect "a = 1 (int)"
31expect "b = 2 (int)"
32expect "x = 1 (int)"
33send "c\n"
34expect "Break on * main in ${test_file}:34"
35expect "${test_file}:34 vdbg> "
36send "scope\n"
37expect "a = 1 (int)"
38expect "b = 2 (int)"
39expect "z = 0 (int)"
40expect "x = 1 (int)"
41send "c\n"
42expect "Break on * main in ${test_file}:40"
43expect "${test_file}:40 vdbg> "
44send "scope\n"
45expect "y = 1 (int)"
46expect "x = 1 (int)"
47send "c\n"
48expect eof
49