You mix up the := operator with the = operator? (-:
There's no chance of mixing them up with the "test" command, note, which is what ajkjk was talking about (even though xe erroneously attributed this to the Bourne Again shell language), because the test command has no assignment operator. Whereas what it does have is a whole bunch of syntactic gotchas that bite people with depressing regularity.
* Miss quoting variables, and suddenly your unary operator turns into an expression that always evaluates true, because with 1 argument test merely tests whether the argument is non-blank, which a unary operator is of course.
* = is string comparison, and -eq is numeric comparison. Yes, you want the other one.
* ... but == is a non-standard bashism that does not work in scripts interpreted by /bin/sh (which is usually something like the Korn or Almquist shell) on many modern systems.
* ... and if you are using the Z, Korn, or Bourne Again shells, don't forget that you need to quote the < and > operators.
* Beware the variable whose value has a minus sign as its first character. All comparisons for safety need to be of the form x"$var" = x"something" .
On the contrary, a real language uses .EQ. . == is for the chattering classes who use the # sign when posting to social media. You appear to be eating quiche. (-: