From 1fbd3e5ee0b0f7266b7e85abc2aef2fb71f08665 Mon Sep 17 00:00:00 2001 From: tg Date: Thu, 9 Jun 2011 21:26:21 +0000 Subject: [PATCH] bugfix for when the last line was full --- check.t | 74 ++++++++++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/check.t b/check.t index 69457be..29f55d4 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.463 2011/06/09 21:10:50 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.464 2011/06/09 21:26:21 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -6609,13 +6609,11 @@ stdin: line=${line:1} done done - if (( (pos & 15) != 1 )); then - while (( pos & 15 )); do - print -n ' ' - (( (pos++ & 15) == 7 )) && print -n -- '- ' - done - print "$dasc|" - fi + while (( pos & 15 )); do + print -n ' ' + (( (pos++ & 15) == 7 )) && print -n -- '- ' + done + print "$dasc|" } expected-stdout: 00000000 5C 20 5C 21 5C 22 5C 23 - 5C 24 5C 25 5C 26 5C 27 |\ \!\"\#\$\%\&\'| @@ -6683,13 +6681,11 @@ stdin: line=${line:1} done done - if (( (pos & 15) != 1 )); then - while (( pos & 15 )); do - print -n ' ' - (( (pos++ & 15) == 7 )) && print -n -- '- ' - done - print "$dasc|" - fi + while (( pos & 15 )); do + print -n ' ' + (( (pos++ & 15) == 7 )) && print -n -- '- ' + done + print "$dasc|" } expected-stdout: 00000000 20 21 22 23 24 25 26 27 - 28 29 2A 2B 2C 2D 2E 2F | !"#$%&'()*+,-./| @@ -6964,13 +6960,11 @@ stdin: line=${line:1} done done - if (( (pos & 15) != 1 )); then - while (( pos & 15 )); do - print -n ' ' - (( (pos++ & 15) == 7 )) && print -n -- '- ' - done - print "$dasc|" - fi + while (( pos & 15 )); do + print -n ' ' + (( (pos++ & 15) == 7 )) && print -n -- '- ' + done + print "$dasc|" } expected-stdout: 00000000 48 65 6C 6C 6F 2C 20 57 - 6F 72 6C 64 21 5C 0A E3 |Hello, World!\..| @@ -7049,13 +7043,11 @@ stdin: dasc=$dasc$dch done done - if (( pos & 7 )); then - while (( pos & 7 )); do - print -n ' ' - (( (pos++ & 7) == 3 )) && print -n -- '- ' - done - print "$dasc|" - fi + while (( pos & 7 )); do + print -n ' ' + (( (pos++ & 7) == 3 )) && print -n -- '- ' + done + print "$dasc|" } expected-stdout: 00000000 0048 0065 006C 006C - 006F 002C 0020 0057 |Hello, W| @@ -7134,13 +7126,11 @@ stdin: (( (pos++ & 15) == 7 )) && print -n -- '- ' done done - if (( (pos & 15) != 1 )); then - while (( pos & 15 )); do - print -n ' ' - (( (pos++ & 15) == 7 )) && print -n -- '- ' - done - print "$dasc|" - fi + while (( pos & 15 )); do + print -n ' ' + (( (pos++ & 15) == 7 )) && print -n -- '- ' + done + print "$dasc|" } expected-stdout: 00000000 48 65 6C 6C 6F 2C 20 57 - 6F 72 6C 64 21 5C 0A E3 |Hello, World!\..| @@ -7216,13 +7206,11 @@ stdin: dasc=$dasc$dch done done - if (( pos & 7 )); then - while (( pos & 7 )); do - print -n ' ' - (( (pos++ & 7) == 3 )) && print -n -- '- ' - done - print "$dasc|" - fi + while (( pos & 7 )); do + print -n ' ' + (( (pos++ & 7) == 3 )) && print -n -- '- ' + done + print "$dasc|" } expected-stdout: 00000000 0048 0065 006C 006C - 006F 002C 0020 0057 |Hello, W|