# HG changeset patch # User ali # Date 1329584902 0 # Node ID adf633a3ae6fc355f56d441b9ba73e7406f63089 # Parent 38ea5c71f04fc523391da0c18deb8ac568c4e4b5 Testcases for short and long lines diff -r 38ea5c71f04f -r adf633a3ae6f test/compatibility/Makefile.am --- a/test/compatibility/Makefile.am Tue Feb 14 22:17:03 2012 +0000 +++ b/test/compatibility/Makefile.am Sat Feb 18 17:08:22 2012 +0000 @@ -5,6 +5,6 @@ example.tst non-ascii.tst embedded-lf.tst markup.tst \ user-defined-typo.tst brackets.tst single-quotes.tst grave-quotes.tst \ dashes.tst control-characters.tst unusual-characters.tst \ - windows-1252.tst periods.tst + windows-1252.tst periods.tst long-line.tst dist_pkgdata_DATA=$(TESTS) diff -r 38ea5c71f04f -r adf633a3ae6f test/compatibility/long-line.tst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/compatibility/long-line.tst Sat Feb 18 17:08:22 2012 +0000 @@ -0,0 +1,39 @@ +**************** ENCODING **************** +WINDOWS-1252 +**************** INPUT **************** +Lines up to seventy five columns should be acceptable and shouldn't trigger +any kind of warning. At seventy six columns, however, one warning is issued. + +Les élèves ont mangés leur petit déjeuner avant le commencement de l'école. +Les pains au chocolat et les petit brioches sont le choix le plus délicieux. + +Unfortunately, with two long lines, we need to drivel on for at least +twenty lines so that more than ninety per cent of the text consists of +non-long lines so that the warnings are not switched off in a misguided +attempt at being helpful. + +“I love to sail the briny deep! + The briny deep for me! +I love to watch the sunlit waves + That brighten up the sea! +I love to listen to the wind + That fills the snowy sails! +I love to roam around the deck----” + + “And eat the fishes’ tails!” +**************** WARNINGS **************** + + + + Long line 76 + + + + Long line 76 + + + + + Query word au - not reporting duplicates + + diff -r 38ea5c71f04f -r adf633a3ae6f test/compatibility/short-line.tst --- a/test/compatibility/short-line.tst Tue Feb 14 22:17:03 2012 +0000 +++ b/test/compatibility/short-line.tst Sat Feb 18 17:08:22 2012 +0000 @@ -1,15 +1,37 @@ **************** INPUT **************** The second line of a paragraph isn't usually short at all -and -should be flagged as a warning by gutcheck as long as there -are sufficient numbers of lines in the file to stop it deciding -that there are too many short lines to bother reporting, which -means that I have to waffle on until we have at least 10 lines -of text. +and should be flagged as a warning by gutcheck as long +as there are sufficient numbers of lines in the file to +stop it deciding that there are too many short lines to bother +reporting, which means that I have to waffle on until we have +at least 10 lines of text. The last line of a paragraph, however many lines it contains, is usually short. + +Even the last line of a paragraph shouldn't consist of only a single +character, since that tends to indicate that the line wrapping may +be fault +y + +Contrawise, digits and characters which might be roman numbers are fine: + +2 + +9 + +I + +V + +X + +L + **************** EXPECTED **************** -and - Line 2 column 3 - Short line 3? +and should be flagged as a warning by gutcheck as long + Line 2 column 54 - Short line 54? + +y + Line 14 column 1 - Query single character line