From: Theo Buehler Subject: Re: patch.sh: use test = op. instead of == To: Omar Polo Cc: gameoftrees@openbsd.org Date: Tue, 8 Mar 2022 10:21:43 +0100 On Tue, Mar 08, 2022 at 10:17:48AM +0100, Omar Polo wrote: > Theo Buehler wrote: > > On Tue, Mar 08, 2022 at 09:49:22AM +0100, Omar Polo wrote: > > > as per subject; i've used == when i really wanted to use just one = > > > > [..] > > > > > ret=$? > > > - if [ $ret == 0 ]; then # should fail > > > + if [ $ret = 0 ]; then # should fail > > > > Since you're comparing integers, shouldn't you be using -eq and -ne, > > respectively? > > yes, -eq and -ne are the correct things to use. i went with = and != > only because that's what the rest of the regress suite uses. (it's > usually spelled [ "$ret" != "0" ] but i dropped the extra quoting.) > > updated diff with -ne and -eq ok