tests/int: use = in test for strings comparison

Strictly speaking, == is for [[ only, not for [ / test,
and, unlike =, the right side is a pattern.

To avoid confusion, use =. In cases where we compare with empty string,
use -z instead.

Keep using [[ in some cases since it does not require quoting the left
and right side of comparison (I trust shellcheck on that one).

This should have no effect (other than the code being a tad more
strict).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-02-07 16:15:52 -08:00
parent c4c48896eb
commit 25ef852ad6
8 changed files with 20 additions and 21 deletions
+3 -3
View File
@@ -35,9 +35,9 @@ function teardown() {
ROOT=$ALT_ROOT runc list -q
[ "$status" -eq 0 ]
[[ "${lines[0]}" == "test_box1" ]]
[[ "${lines[1]}" == "test_box2" ]]
[[ "${lines[2]}" == "test_box3" ]]
[ "${lines[0]}" = "test_box1" ]
[ "${lines[1]}" = "test_box2" ]
[ "${lines[2]}" = "test_box3" ]
ROOT=$ALT_ROOT runc list --format table
[ "$status" -eq 0 ]