Skip to content

Commit

Permalink
tests: fix notices for var_scope.vv in vlib/v/debug/interactive_test.v
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Feb 16, 2024
1 parent 3937ecc commit e12c8c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions vlib/v/debug/interactive_test.v
Expand Up @@ -5,7 +5,7 @@ import time
const vexe = @VEXE
const expect_tests_path = os.join_path(@VEXEROOT, 'vlib', 'v', 'debug', 'tests')
const test_module_path = os.join_path(os.vtmp_dir(), 'test_vdbg_input')
const bar = term.yellow('-'.repeat(105))
const bar = term.yellow('-'.repeat(107))
const be_verbose = os.getenv('GITHUB_JOB') != '' || os.getenv('VERBOSE') != ''

const expect_exe = os.quoted_path(os.find_abs_path_of_executable('expect') or {
Expand Down Expand Up @@ -42,7 +42,7 @@ fn test_debugger() {
if be_verbose {
println(bar)
}
gprint('>>>> Running [${eidx + 1}/${all_expect_files.len}] ${term.magenta(efile):-68} ... ')
gprint('>>>> Running [${eidx + 1:2}/${all_expect_files.len:-2}] ${term.magenta(efile):-68} ... ')
if be_verbose {
println('')
}
Expand Down
20 changes: 10 additions & 10 deletions vlib/v/debug/tests/var_scope.expect
Expand Up @@ -12,35 +12,35 @@ send "scope\n"
expect "e = 3 (int)"
expect "a = 1 (int)"
send "c\n"
expect "Break on * main in ${test_file}:20"
expect "${test_file}:20 vdbg> "
expect "Break on * main in ${test_file}:21"
expect "${test_file}:21 vdbg> "
send "scope\n"
expect "x = 1 (int)"
send "c\n"
expect "Break on * main in ${test_file}:25"
expect "${test_file}:25 vdbg> "
expect "Break on * main in ${test_file}:26"
expect "${test_file}:26 vdbg> "
send "scope\n"
expect "a = 1 (int)"
expect "b = 2 (int)"
expect "x = 1 (int)"
send "c\n"
expect "Break on * main in ${test_file}:30"
expect "${test_file}:30 vdbg> "
expect "Break on * main in ${test_file}:31"
expect "${test_file}:31 vdbg> "
send "scope\n"
expect "a = 1 (int)"
expect "b = 2 (int)"
expect "x = 1 (int)"
send "c\n"
expect "Break on * main in ${test_file}:33"
expect "${test_file}:33 vdbg> "
expect "Break on * main in ${test_file}:34"
expect "${test_file}:34 vdbg> "
send "scope\n"
expect "a = 1 (int)"
expect "b = 2 (int)"
expect "z = 0 (int)"
expect "x = 1 (int)"
send "c\n"
expect "Break on * main in ${test_file}:38"
expect "${test_file}:38 vdbg> "
expect "Break on * main in ${test_file}:40"
expect "${test_file}:40 vdbg> "
send "scope\n"
expect "y = 1 (int)"
expect "x = 1 (int)"
Expand Down
2 changes: 2 additions & 0 deletions vlib/v/debug/tests/var_scope.vv
Expand Up @@ -9,6 +9,7 @@ fn main() {
} else {
e := 3
$dbg;
println(e)
}
a
}
Expand All @@ -31,6 +32,7 @@ fn main() {
0
}
$dbg;
println(z)
1
} else {
0
Expand Down

0 comments on commit e12c8c1

Please sign in to comment.