Skip to content

Commit

Permalink
v.pref: fix new pref test on FreeBSD (#21385)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimshrier authored Apr 30, 2024
1 parent 45eed64 commit 87a82ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vlib/v/pref/pref_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ fn test_version_falg() {
assert v_verbose_cmd_res != v_ver_cmd_res
assert v_verbose_cmd_res.contains('v.pref.lookup_path:')

v_verbose_cmd_with_additional_args_res := os.execute_opt('${vexe} -cc tcc -v run ${example_path}')!.output
// tcc does not handle the symver assembly directive which is
// a problem on FreeBSD 14
mut compiler := 'tcc'
$if freebsd && clang {
compiler = 'clang'
}

v_verbose_cmd_with_additional_args_res := os.execute_opt('${vexe} -cc ${compiler} -v run ${example_path}')!.output
assert v_verbose_cmd_with_additional_args_res != v_ver_cmd_res
assert v_verbose_cmd_with_additional_args_res.contains('v.pref.lookup_path:')
}

0 comments on commit 87a82ba

Please sign in to comment.