Keri Harris
2017-09-27 08:33:09 UTC
Hi,
When running the Mercury test unit tests using a non-standard terminal
width, the debugger/completion test can fail:
INPUTRC=completion.inputrc HOME=/nonexistent
MERCURY_SUPPRESS_MDB_BANNER=yes MERCURY_DEBUGGER_INIT=../mdbrc mdb
./completion \
< completion.inp 2>&1 | sed -e '/^$/d' > completion.out 2>&1
Comparing completion.out with completion.exp*,
results in completion.res
** completion.out did not match the expected output
With a terminal width set much wider than 80 columns we can get
completion.out containing entries like:
1 mdb>
2 func*completion. <snip items> func*completion.sub2.sub3.
3 func*completion.z func*completion.zz
4 b func*completion.z
5 1: + stop interface func completion.z/0-0 (det)
while the completion.exp files expect entries to be using a standard (80
column) width:
1 mdb>
2 func*completion. func*completion.sub2.
3 func*completion.sub1. func*completion.sub2.sub3.
4 func*completion.z func*completion.zz
5 b func*completion.z
6 1: + stop interface func completion.z/0-0 (det)
(I've added line numbers and snipped some of the output to get it to
format nicely in an email).
Hard coding the display width to 80 columns in completion.inputrc allows
the test to pass, irrespective of the underlying terminal width.
Attached is a patch to accomplish this.
Thanks
Keri
When running the Mercury test unit tests using a non-standard terminal
width, the debugger/completion test can fail:
INPUTRC=completion.inputrc HOME=/nonexistent
MERCURY_SUPPRESS_MDB_BANNER=yes MERCURY_DEBUGGER_INIT=../mdbrc mdb
./completion \
< completion.inp 2>&1 | sed -e '/^$/d' > completion.out 2>&1
Comparing completion.out with completion.exp*,
results in completion.res
** completion.out did not match the expected output
With a terminal width set much wider than 80 columns we can get
completion.out containing entries like:
1 mdb>
2 func*completion. <snip items> func*completion.sub2.sub3.
3 func*completion.z func*completion.zz
4 b func*completion.z
5 1: + stop interface func completion.z/0-0 (det)
while the completion.exp files expect entries to be using a standard (80
column) width:
1 mdb>
2 func*completion. func*completion.sub2.
3 func*completion.sub1. func*completion.sub2.sub3.
4 func*completion.z func*completion.zz
5 b func*completion.z
6 1: + stop interface func completion.z/0-0 (det)
(I've added line numbers and snipped some of the output to get it to
format nicely in an email).
Hard coding the display width to 80 columns in completion.inputrc allows
the test to pass, irrespective of the underlying terminal width.
Attached is a patch to accomplish this.
Thanks
Keri