Open vkhetrapal opened 9 years ago
These lines are the issue :
verify git installation1/2 ✓ verify git installation ✓ Verifying whether git binary is available
Somewhere along the way, the UTF-8-encoded ✓ is incorrectly being interpreted with Windows-1252 encoding. You will have to narrow down where. You could start by opening libexec/bats-format-tap-stream
in a text editor to see if it's encoded correctly on-disk. If so, I'd guess your terminal does not support UTF-8.
It could also be your font not having the characters in question. Take a look at libexec/bats-format-tap-stream
in #128. You might e.g. view it like this:
head -46 libexec/bats-format-tap-stream | tail -7
This should show you:
if [[ $OSTYPE != *msys* ]]; then
PASS_SYMBOL='✓'
FAIL_SYMBOL='✗'
else
PASS_SYMBOL='√'
FAIL_SYMBOL='×'
fi
Can you see any of the characters correctly in your terminal?
I am actually using busser-bats gem and a look at /root/.chefdk/gem/ruby/2.1.0/gems/busser-bats-0.3.0/vendor/bats/libexec/bats-format-tap-stream shows this :
pass() { go_to_column 0 printf " ✓ %s" "$name" advance
fail() { go_to_column 0 set_color 1 bold printf " ✗ %s" "$name" advance
maybe you need to change your system locale to UTF-8: https://google.com/search?q=CentOS+utf-8
I have created below script for testing installation of git.
!/usr/bin/env bats
@test "verify git installation" { run bash -c "rpm -qa|grep git" [ "$status" -eq 0 ] }
@test "Verifying whether git binary is available" { run which git [ "$status" -eq 0 ]
Due to some reason, my "kitchen verify" produces weird O/P. Am I doing something wrong ? I am using docker (centos7 -- base image) as kitchen driver.
kitchen verify
-----> Starting Kitchen (v1.4.2) -----> Verifying...
$$$$$$ Running legacy verify for 'Docker' Driver
Preparing files for transfer
Removing /tmp/verifier/suites/bats
Transferring files to
-----> Running bats test suite
verify git installation1/2 ✓ verify git installation
✓ Verifying whether git binary is available
-----> Kitchen is finished. (0m0.98s)