From fcecf527ec36666d3c5b6ab9fdda86404bbbf6d6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 12 Nov 2021 10:27:35 +0200 Subject: [PATCH] ci: fix failing os_test.v on the CI --- vlib/os/os_test.v | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vlib/os/os_test.v b/vlib/os/os_test.v index a15484ead0..6373a21cb6 100644 --- a/vlib/os/os_test.v +++ b/vlib/os/os_test.v @@ -848,13 +848,15 @@ fn test_execute() { } // The output of the next command contains a 0 byte in the middle. // Nevertheless, the execute function *should* return a string that - // contains it: - result := os.execute('printenv --null LANGUAGE LANG') + // contains it. NB: TERM, SHELL and HOME are used here, because they are + // very likely to be present, unlike LANGUAGE and LANG. + result := os.execute('printenv --null TERM SHELL HOME') hexresult := result.output.bytes().hex() - println(result.exit_code) - println(result.output.len) - println(hexresult) + println('exit_code: $result.exit_code') + println('output: |$result.output|') + println('output.len: $result.output.len') + println('output hexresult: $hexresult') assert result.exit_code == 0 assert result.output.len > 0 - assert hexresult.contains('00') + assert hexresult.contains('002f') }