From e3f79df3acace4bdc0e7cce3091e454fd92aaea6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 25 Aug 2020 18:52:28 +0300 Subject: [PATCH] tests: support .vv in compiler_test.v too --- vlib/v/tests/inout/compiler_test.v | 8 ++------ vlib/v/tests/inout/panic_with_cg.out | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/vlib/v/tests/inout/compiler_test.v b/vlib/v/tests/inout/compiler_test.v index 706363545e..f89f2b2710 100644 --- a/vlib/v/tests/inout/compiler_test.v +++ b/vlib/v/tests/inout/compiler_test.v @@ -24,17 +24,13 @@ fn test_all() { }) for path in paths { print(path + ' ') - program := path.replace('.vv', '.v') - os.cp(path, program) or { - panic(err) - } + program := path compilation := os.exec('$vexe -o test -cflags "-w" -cg $program') or { panic(err) } if compilation.exit_code != 0 { panic('compilation failed: $compilation.output') } - // os.rm(program) res := os.exec('./test') or { println('nope') panic(err) @@ -52,7 +48,7 @@ fn test_all() { // println(res.output) // println('============') mut found := res.output.trim_right('\r\n').replace('\r\n', '\n') - mut expected := os.read_file(program.replace('.v', '') + '.out') or { + mut expected := os.read_file(program.replace('.vv', '') + '.out') or { panic(err) } expected = expected.trim_right('\r\n').replace('\r\n', '\n') diff --git a/vlib/v/tests/inout/panic_with_cg.out b/vlib/v/tests/inout/panic_with_cg.out index d7fd08b551..8d0008db70 100644 --- a/vlib/v/tests/inout/panic_with_cg.out +++ b/vlib/v/tests/inout/panic_with_cg.out @@ -2,5 +2,5 @@ module: main function: buggy_function() message: panicing... - file: vlib/v/tests/inout/panic_with_cg.v + file: vlib/v/tests/inout/panic_with_cg.vv line: 3