1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
## Stops automatically in _do_component_tests.
## Test for option parsing.
set debuglevel=1
set opt__list[OPT__FILTER].i_val=0
set opt__list[OPT__FILTER].prio=0
#= 0
print opt__list[OPT__FILTER].i_val
print opt__list[OPT__FILTER].prio
set buffer="filter=any"
call opt__parse(buffer, 0, 1, 0)
#= -1
print opt__list[OPT__FILTER].i_val
set buffer="filter\0none;text"
call opt__parse(buffer, buffer+7, 2, 0)
#= 7
print opt__list[OPT__FILTER].i_val
set buffer="filter=none"
call opt__parse(buffer, 0, 3, 0)
#= 0
print opt__list[OPT__FILTER].i_val
call strcpy(buffer, "filter=mtime,owner:group")
call opt__parse(buffer, 0, 4, 0)
#= 0xe0
print /x opt__list[OPT__FILTER].i_val
set buffer="delay=no"
call opt__parse(buffer, 0, 1, 0)
#= 0
print opt__list[OPT__DELAY].i_val
set buffer="delay=yes"
call opt__parse(buffer, 0, 2, 0)
#= -1
print opt__list[OPT__DELAY].i_val
set buffer="delay=commit,update,checkout,revert"
call opt__parse(buffer, 0, 3, 0)
#= 15
print opt__list[OPT__DELAY].i_val
|