From fd9f5cb45f37b67d826aae240ba78d9314defe81 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sat, 12 Apr 2025 23:42:07 +0100 Subject: [PATCH] disambiguate expected string "{ lan }" appears only in output "lan" appears also in the command line we send --- tests/pppoe/getaddress.expect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pppoe/getaddress.expect b/tests/pppoe/getaddress.expect index 31d04596..9a56338c 100644 --- a/tests/pppoe/getaddress.expect +++ b/tests/pppoe/getaddress.expect @@ -24,7 +24,7 @@ expect "#READY#" set timeout 30 send "nft list set ip table-ip lan || touch /non/existent\n" expect { - "lan" { puts "lan found" } + "{ \"lan\" }" { puts "lan found" } "{ }" { puts "missing ifname"; exit 1 } "No such file or directory" { exit 1 } } @@ -36,7 +36,7 @@ expect "#READY#" # appears and you just have to make this sleep longer. Ew, yes send "sleep 10; nft list set ip table-ip wan || touch /non/existent\n" expect { - "ppp0" { puts "ppp0 found " } + "{ \"ppp0\" }" { puts "ppp0 found " } "{ }" { puts "missing ifname"; exit 1 } "No such file or directory" { exit 1 } timeout { exit 1 }