diff -Nru braillefont-1.0/debian/changelog braillefont-1.0/debian/changelog --- braillefont-1.0/debian/changelog 2020-12-04 02:28:44.000000000 +0000 +++ braillefont-1.0/debian/changelog 2021-09-28 14:38:36.000000000 +0000 @@ -1,3 +1,13 @@ +braillefont (1.0-4) unstable; urgency=low + + * watch: Adjusting to new github url format + * patches: Fixing garbled output for the non-interactive case + of no trailing newline in input. Thanks to joostvb for reporting this. + * control: bumping standards version - no changes needed. + * tests: adding autopkgtest for non-interactive text input w/wo newline + + -- Judit Foglszinger Tue, 28 Sep 2021 21:38:36 +0700 + braillefont (1.0-3) unstable; urgency=medium * control: bumping standards version - no changes needed. diff -Nru braillefont-1.0/debian/control braillefont-1.0/debian/control --- braillefont-1.0/debian/control 2020-12-04 02:03:15.000000000 +0000 +++ braillefont-1.0/debian/control 2021-09-28 14:38:36.000000000 +0000 @@ -3,7 +3,7 @@ Section: text Priority: optional Build-Depends: libgd-perl, binutils, debhelper (>= 13~), debhelper-compat (= 13) -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Homepage: https://github.com/kilobyte/braillefont Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/debian/braillefont.git diff -Nru braillefont-1.0/debian/patches/fixing-garbled-output-for-no-trailing-newline-in-input braillefont-1.0/debian/patches/fixing-garbled-output-for-no-trailing-newline-in-input --- braillefont-1.0/debian/patches/fixing-garbled-output-for-no-trailing-newline-in-input 1970-01-01 00:00:00.000000000 +0000 +++ braillefont-1.0/debian/patches/fixing-garbled-output-for-no-trailing-newline-in-input 2021-09-28 14:38:36.000000000 +0000 @@ -0,0 +1,39 @@ +Description: Fixing garbled output for no trailing newline in input + Printing newline in case of eof to emulate a trailing newline. + . + Due to how fgetws works (reading until meeting a newline, + returning NULL, if end of stream is reached), + if there would be a trailing newline, we never would see the eof, + so we wouldn't print double newlines. + . + This patch only fixes the case of a non-interactive input, + because in the interactive case, the input itself shifts the output, + if there is no new line - + example: + test⠤⡧⠄⡠⠤⡀⡠⠤⠄⠤⡧⠄ +⠀⠣⠄⠫⠭⠁⠬⠭⠂⠀⠣⠄ +Forwarded: yes (via IRC on Fri Jul 23 22:00:36 2021) +Last-Update: 2021-07-23 + +--- braillefont-1.0.orig/braillefont.c ++++ braillefont-1.0/braillefont.c +@@ -62,6 +62,9 @@ int main() + else + phalf(map_character(*b), 0); + } ++ if(feof(stdin)) { ++ printf("\n"); ++ } + for (b=buf; *b; b++) + { + if (*b < 32) +@@ -69,6 +72,9 @@ int main() + else + phalf(map_character(*b), 4*L); + } ++ if(feof(stdin)) { ++ printf("\n"); ++ } + } + + return 0; diff -Nru braillefont-1.0/debian/patches/series braillefont-1.0/debian/patches/series --- braillefont-1.0/debian/patches/series 2020-12-04 02:28:44.000000000 +0000 +++ braillefont-1.0/debian/patches/series 2021-09-28 14:38:36.000000000 +0000 @@ -1,2 +1,3 @@ adding-support-for-build-flags fixing-possible-buffer-overflow-in-fgetws +fixing-garbled-output-for-no-trailing-newline-in-input diff -Nru braillefont-1.0/debian/tests/control braillefont-1.0/debian/tests/control --- braillefont-1.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ braillefont-1.0/debian/tests/control 2021-09-28 14:38:36.000000000 +0000 @@ -0,0 +1 @@ +Tests: pkgtests diff -Nru braillefont-1.0/debian/tests/pkgtests braillefont-1.0/debian/tests/pkgtests --- braillefont-1.0/debian/tests/pkgtests 1970-01-01 00:00:00.000000000 +0000 +++ braillefont-1.0/debian/tests/pkgtests 2021-09-28 14:38:36.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +echo "test one - simple string with trailing newline" +result=$(echo banana|braillefont) +expected_result="\ +⡧⠤⡀⠠⠤⡀⣄⠤⡀⠠⠤⡀⣄⠤⡀⠠⠤⡀ +⠣⠤⠃⠪⠭⠇⠇⠀⠇⠪⠭⠇⠇⠀⠇⠪⠭⠇" +test "$result" = "$expected_result" + +echo "test two - simple string without trailing newline" +result=$(echo -n banana|braillefont) +expected_result="\ +⡧⠤⡀⠠⠤⡀⣄⠤⡀⠠⠤⡀⣄⠤⡀⠠⠤⡀ +⠣⠤⠃⠪⠭⠇⠇⠀⠇⠪⠭⠇⠇⠀⠇⠪⠭⠇" +test "$result" = "$expected_result" diff -Nru braillefont-1.0/debian/watch braillefont-1.0/debian/watch --- braillefont-1.0/debian/watch 2020-10-17 08:57:52.000000000 +0000 +++ braillefont-1.0/debian/watch 2021-09-28 14:38:36.000000000 +0000 @@ -1,2 +1,2 @@ version=4 -https://github.com/kilobyte/braillefont/releases /kilobyte/braillefont/archive/v(.+)\.tar\.gz +https://github.com/kilobyte/braillefont/tags .*/v(.+)\.tar\.gz