From 201a1281ecafed4c20ef478588857380a04a8497 Mon Sep 17 00:00:00 2001 From: "D. Bohdan" Date: Wed, 27 May 2020 13:00:19 +0000 Subject: [PATCH] test(aio,socket,tty): match musl error messages --- tests/aio.test | 2 +- tests/socket.test | 6 +++--- tests/tty.test | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/aio.test b/tests/aio.test index 361acdc..4b04dbd 100644 --- a/tests/aio.test +++ b/tests/aio.test @@ -116,7 +116,7 @@ test aio-7.1 {close args} -constraints socket -body { test aio-7.2 {close w on non-socket} -constraints socket -body { $f close w -} -returnCodes error -result {Socket operation on non-socket} +} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} test aio-7.3 {close -nodelete on non-socket} -constraints socket -body { $f close -nodelete diff --git a/tests/socket.test b/tests/socket.test index 20a5f2e..f2d940f 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -290,7 +290,7 @@ test socket-3.3 {listen usage} -body { test socket-3.4 {listen not a socket} -body { set f [open [info script]] $f listen 10 -} -returnCodes error -match glob -result {Socket operation on non-socket} -cleanup { +} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} -cleanup { $f close } @@ -305,14 +305,14 @@ test socket-4.2 {invalid ipv4 address} -body { test socket-4.3 {sockname on non-socket} -body { set f [open [info script]] $f sockname -} -returnCodes error -result {Socket operation on non-socket} -cleanup { +} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} -cleanup { $f close } test socket-4.4 {peername on non-socket} -body { set f [open [info script]] $f peername -} -returnCodes error -result {Socket operation on non-socket} -cleanup { +} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} -cleanup { $f close } diff --git a/tests/tty.test b/tests/tty.test index a2606ab..53bea2c 100644 --- a/tests/tty.test +++ b/tests/tty.test @@ -24,7 +24,7 @@ test tty-1.3 {tty bad baud} -body { test tty-1.4 {tty bad fd} -body { set f [open [file tempfile] w] $f tty -} -returnCodes error -result {Inappropriate ioctl for device} -cleanup { +} -returnCodes error -match regexp -result {^(Inappropriate ioctl for device|Not a tty)$} -cleanup { $f close } -- 2.11.4.GIT