From fd12e4e8263d221ae638ce0186f583dbc79c30b6 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 2 Apr 2020 18:11:24 +0200 Subject: [PATCH] fix compiler_test.v --- cmd/v/v.v | 24 +++--------------------- vlib/v/tests/inout/compiler_test.v | 2 +- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/cmd/v/v.v b/cmd/v/v.v index 11a3f4beb3..b720c7dc6e 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -5,7 +5,6 @@ module main import ( internal.compile - internal.flag internal.help os os.cmdline @@ -41,22 +40,14 @@ fn main() { } prefs2, command := parse_args(args) //println('command = $command') - //command := if values.len > 0 { values[0] } else { '' } - /* - prefs := flag.MainCmdPreferences{} - values := flag.parse_main_cmd(os.args, parse_flags, prefs) or { - println('V Error: An error has occurred while parsing flags: ') - println(err) - exit(1) - } - */ if prefs2.is_verbose { println(util.full_v_version()) } if prefs2.is_verbose { - //println('Parsed preferences: ') + //println('args= ') + //println(args) // QTODO + //println('prefs= ') //println(prefs) // QTODO - //println('Remaining: $values') } // Start calling the correct functions/external tools // Note for future contributors: Please add new subcommands in the `match` block below. @@ -155,15 +146,6 @@ fn invoke_help_and_exit(remaining []string) { exit(1) } -[inline] -fn disallow_unknown_flags(prefs flag.MainCmdPreferences) { - if prefs.unknown_flag == '' { - return - } - println('V Error: Unexpected flag found: $prefs.unknown_flag') - exit(1) -} - fn create_symlink() { $if windows { return diff --git a/vlib/v/tests/inout/compiler_test.v b/vlib/v/tests/inout/compiler_test.v index cfe64d277c..8643370881 100644 --- a/vlib/v/tests/inout/compiler_test.v +++ b/vlib/v/tests/inout/compiler_test.v @@ -26,7 +26,7 @@ fn test_all() { panic(err) } os.rm('exe') - x := os.exec('$vexe -o exe -cflags "-w" -cg -backend experimental $program') or { + x := os.exec('$vexe -o exe -cflags "-w" -cg $program') or { panic(err) } // os.rm(program)