Commit c7adcb36 authored by User expired's avatar User expired
Browse files

test: Add tests for whitespace formatting

parent 4b596b27
......@@ -120,6 +120,18 @@ testPrintChangesContent() {
assertTrue 'file3 unchanged with -n' "writeFileThree | diff - $fileThree"
}
testWhiteSpace() {
echo ' Field = {one two three } ' > $fileOne
bib-format $fileOne
assertEquals ' Field = {one two three}' "$(cat $fileOne)"
echo ' Field = {one two three }, ' > $fileOne
bib-format $fileOne
assertEquals ' Field = {one two three},' "$(cat $fileOne)"
echo ' Field = "one two three ", ' > $fileOne
bib-format $fileOne
assertEquals ' Field = {one two three},' "$(cat $fileOne)"
}
testFormatStructure() {
bib-format -u $fileOne
bib-format -u $fileTwo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment