| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Like $assertions_for_sysvar_value, but check both a variable and its |
| 4 |
# alias. |
| 5 |
# |
| 6 |
# ==== Usage ==== |
| 7 |
# |
| 8 |
# --let $name = NAME |
| 9 |
# --let $alias = ALIAS |
| 10 |
# # other parameters, except $variable, are as for |
| 11 |
# # assertions_for_sysvar_value.inc |
| 12 |
# --source check_syvar_value_with_alias.inc |
| 13 |
|
| 14 |
|
| 15 |
# As an optimization, we load the persisted variables file here, instead |
| 16 |
# of in each invocation of check_sysvar_value.inc. |
| 17 |
# Restore $persisted_json at the end of the script to not confuse the caller. |
| 18 |
--let $_csaav_was_load = 0 |
| 19 |
if ($persisted_json == LOAD) { |
| 20 |
--let $_csaav_was_load = 1 |
| 21 |
--source load_persisted_json.inc |
| 22 |
} |
| 23 |
|
| 24 |
--let $variable = $name |
| 25 |
--source assertions_for_sysvar_value.inc |
| 26 |
--let $variable = $alias |
| 27 |
--source assertions_for_sysvar_value.inc |
| 28 |
|
| 29 |
if ($_csaav_was_load) { |
| 30 |
--let $persisted_json = LOAD |
| 31 |
} |