-
Notifications
You must be signed in to change notification settings - Fork 517
No check-marks and X in a bats script test run O/P #127
Comments
These lines are the issue : verify git installation1/2 ✓ verify git installation |
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 |
It could also be your font not having the characters in question. Take a look at 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() { fail() { |
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)
The text was updated successfully, but these errors were encountered: