I'm testing 3 seperate text display algorithms using bats. I found that the reporting was very accurate when one of my algorithms was providing extra spacing.
When I put my data into an array and I output it two of the three give expected output. The third one does not and I can clearly see that it does not.
Here is a small snipped of the approrpiate output:
$ printf '%s\n' "${ManArray[@]}" | head -n 5
WC(1) User Commands WC(1)
NAME
wc - print newline, word, and byte counts for each file
Here is when I run the display through the text library:
$ ManArray=$( man wc ); msg "${ManArray[@]}" | head -n 5
WC(1) User Commands WC(1)
NAME
wc - print newline, word, and byte counts for each file
I'm testing 3 seperate text display algorithms using bats. I found that the reporting was very accurate when one of my algorithms was providing extra spacing.
When I put my data into an array and I output it two of the three give expected output. The third one does not and I can clearly see that it does not. Here is a small snipped of the approrpiate output:
Here is when I run the display through the text library:
Here is the bats file used in this test:
Result:
Am I doing something wrong or am I right to think that this test should fail?