xref: /openbmc/u-boot/doc/README.commands.itest (revision cd0a9de68b03e5a54fd2a08f44be318e4397be01)
1*2d1a537dSwdenkA slow day today so here is a revised itest command with provisional
2*2d1a537dSwdenksupport for comparing strings as well :-))
3*2d1a537dSwdenk
4*2d1a537dSwdenkNow table driven to allow the operators
5*2d1a537dSwdenk-eq, -ne, -lt, -gt, -le, -ge, ==, !=, <>, <, >, <=, >=
6*2d1a537dSwdenk
7*2d1a537dSwdenkUses the expected command modifier for integer compares of width 1, 2 or
8*2d1a537dSwdenk4 bytes of .b, .w, .l and the new modifer of .s for a string compare.
9*2d1a537dSwdenkString comparison is over the length of the shorter, this hopefully
10*2d1a537dSwdenkavoids missing terminators when using an indirect pointer.
11*2d1a537dSwdenk
12*2d1a537dSwdenkeg.
13*2d1a537dSwdenkif itest.l *40000 == 12345678 then; ....
14*2d1a537dSwdenkif itest.w *40000 != 1234 then; ....
15*2d1a537dSwdenkif itest.b *40000 >= 12 then; ....
16*2d1a537dSwdenkif itest.s *40000 -eq hello then; ....
17