From e12c8c1e201d851bc749c2c495fd72165103def1 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 16 Feb 2024 14:56:54 +0200 Subject: [PATCH] tests: fix notices for var_scope.vv in vlib/v/debug/interactive_test.v --- vlib/v/debug/interactive_test.v | 4 ++-- vlib/v/debug/tests/var_scope.expect | 20 ++++++++++---------- vlib/v/debug/tests/var_scope.vv | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/vlib/v/debug/interactive_test.v b/vlib/v/debug/interactive_test.v index f1bbb48e6..7a9b253a8 100644 --- a/vlib/v/debug/interactive_test.v +++ b/vlib/v/debug/interactive_test.v @@ -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 { @@ -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('') } diff --git a/vlib/v/debug/tests/var_scope.expect b/vlib/v/debug/tests/var_scope.expect index 8e0939a0c..bba0e03e0 100644 --- a/vlib/v/debug/tests/var_scope.expect +++ b/vlib/v/debug/tests/var_scope.expect @@ -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)" diff --git a/vlib/v/debug/tests/var_scope.vv b/vlib/v/debug/tests/var_scope.vv index 1c862e172..3dde5c37f 100644 --- a/vlib/v/debug/tests/var_scope.vv +++ b/vlib/v/debug/tests/var_scope.vv @@ -9,6 +9,7 @@ fn main() { } else { e := 3 $dbg; + println(e) } a } @@ -31,6 +32,7 @@ fn main() { 0 } $dbg; + println(z) 1 } else { 0 -- 2.39.5