• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbland / go-script-bash / 283 / 1
95%
master: 95%

Build:
DEFAULT BRANCH: master
Ran 17 Dec 2016 06:30PM UTC
Files 38
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Dec 2016 06:11PM UTC coverage: 94.649% (+1.3%) from 93.395%
283.1

push

travis-ci

mbland
log: Extract helper script to fix Windows breakage

PR #28 introduced the `stack_trace_item` test helper function so that tests
could validate expected stack trace output without hardcoding line numbers. I
failed to notice that this behavior was broken on Windows, due to leading
whitespace getting stripped and CRLF line endings not being handled by the
`while read -r line` loop.

The fix for the whitespace was easy. Per the following, setting `IFS=` did the
trick:

https://stackoverflow.com/questions/29689172/bash-read-line-does-not-read-leading-spaces/29689199#2968919

However, adding the following as the first line of the loop by itself wasn't
enough:

    line="${line%$'\r'}"

It turned out that when the `stack-trace-item` file was getting written, it
would replace this line with:

    line="${line%^M}";

where `^M` was the literal carriage return character, not the Bash string.
Somehow this was causing the line to continue to retain its trailing carriage
return, causing the tests to continue to fail.

I only started to figure this out after adding some `echo` statements to print
things to standard error, followed by one of:

    | sed -n l >&2
    | od -A n -vt c >&2

per:

https://unix.stackexchange.com/questions/213504/how-to-print-control-characters-with-escape-sequences/213510#213510

Eventually I realized it made sense to break out the script anyway, as it
wasn't being customized by the `stack_trace_item` function. Now the tests all
pass on Windows.

1645 of 1738 relevant lines covered (94.65%)

123.94 hits per line

Source Files on job 283.1
  • Tree
  • List 0
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 283
  • Travis Job 283.1
  • 3ea08f38 on github
  • Prev Job for on master (#270.1)
  • Next Job for on master (#285.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc