Mercurial > gnulib
view tests/test-binary-io.sh @ 18701:7b67f85ec2c9
xbinary-io: rename from xsetmode
This patch is taken from suggestions by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00060.html
http://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00061.html
* lib/binary-io.c (__gl_setmode_check): Set errno to EINVAL,
not ENOTTY, when it is an inappropriate device.
* lib/binary-io.h (SET_BINARY): Resurrect.
* lib/xbinary-io.c: Rename from lib/xsetmode.c.
(xset_binary_mode_error): Rename from xsetmode_error.
* lib/xbinary-io.h: Rename from lib/xsetmode.h.
(xset_binary_mode): Rename from xsetmode.
All uses changed.
* modules/xbinary-io: Rename from modules/xsetmode.
Update file names.
* tests/test-binary-io.sh (tmpfiles): Remove no-longer-used file name.
* NEWS: Update to match revised behavior.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Thu, 16 Feb 2017 00:17:56 -0800 |
parents | 0f17c4953865 |
children | 8c1a17df67e0 |
line wrap: on
line source
#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp" ./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1 cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1 rm -fr $tmpfiles exit 0