aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tdef
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-11 21:19:46 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-06-11 21:50:17 +0200
commit6df2e44404bd710b13539a09450117f755498c65 (patch)
treece834c83724b02d764e84b9a6886d6f10e7abdbc /tests/tdef
parent4742526645d6137dd90ef369f0415afdb91736dc (diff)
vty: command.c: Fix is_cmd_ambiguous() returning always 0
inner block defined variable "enum match_type ret" was being masking outter block variable "int ret = 0". The ret variable was being given non zero values only inside the inner block, so that change was done on the inner variable and not the outer one, which is returned. Fixes: 5314c513f23688462d7f7937e5ae5e0d5cd4548e Change-Id: Iec87d7db49a096d07e38ff8a060b923a52bfd6ba
Diffstat (limited to 'tests/tdef')
-rw-r--r--tests/tdef/tdef_vty_test_config_root.vty41
1 files changed, 6 insertions, 35 deletions
diff --git a/tests/tdef/tdef_vty_test_config_root.vty b/tests/tdef/tdef_vty_test_config_root.vty
index e7c96ca3..8613ff36 100644
--- a/tests/tdef/tdef_vty_test_config_root.vty
+++ b/tests/tdef/tdef_vty_test_config_root.vty
@@ -115,32 +115,13 @@ tdef_vty_test(config)# do show timer tea T-123
% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123'
tdef_vty_test(config)# do show timer t
-tea: T1 = 50 s Water Boiling Timeout (default: 50 s)
-tea: T2 = 300 s Tea brewing (default: 300 s)
-tea: T3 = 5 m Let tea cool down before drinking (default: 5 m)
-tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m)
-test: T1 = 100 s Testing a hundred seconds (default: 100 s)
-test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms)
-test: T3 = 100 m Testing a hundred minutes (default: 100 m)
-test: T4 = 100 Testing a hundred potatoes (default: 100)
-test: T2147483647 = 4294967295 m Very large (default: 4294967295 m)
-test: X23 = 239471 s Negative T number (default: 239471 s)
+% Ambiguous command.
tdef_vty_test(config)# do show timer te
-tea: T1 = 50 s Water Boiling Timeout (default: 50 s)
-tea: T2 = 300 s Tea brewing (default: 300 s)
-tea: T3 = 5 m Let tea cool down before drinking (default: 5 m)
-tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m)
-test: T1 = 100 s Testing a hundred seconds (default: 100 s)
-test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms)
-test: T3 = 100 m Testing a hundred minutes (default: 100 m)
-test: T4 = 100 Testing a hundred potatoes (default: 100)
-test: T2147483647 = 4294967295 m Very large (default: 4294967295 m)
-test: X23 = 239471 s Negative T number (default: 239471 s)
+% Ambiguous command.
tdef_vty_test(config)# do show timer te T2
-tea: T2 = 300 s Tea brewing (default: 300 s)
-test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms)
+% Ambiguous command.
tdef_vty_test(config)# timer tea 3 30
@@ -174,20 +155,10 @@ tea: T3 = 32 m Let tea cool down before drinking (default: 5 m)
tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m)
tdef_vty_test(config)# timer t
-tea: T1 = 50 s Water Boiling Timeout (default: 50 s)
-tea: T2 = 300 s Tea brewing (default: 300 s)
-tea: T3 = 32 m Let tea cool down before drinking (default: 5 m)
-tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m)
-test: T1 = 100 s Testing a hundred seconds (default: 100 s)
-test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms)
-test: T3 = 100 m Testing a hundred minutes (default: 100 m)
-test: T4 = 100 Testing a hundred potatoes (default: 100)
-test: T2147483647 = 4294967295 m Very large (default: 4294967295 m)
-test: X23 = 239471 s Negative T number (default: 239471 s)
+% Ambiguous command.
tdef_vty_test(config)# timer te T2
-tea: T2 = 300 s Tea brewing (default: 300 s)
-test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms)
+% Ambiguous command.
tdef_vty_test(config)# timer test T2 100
@@ -195,7 +166,7 @@ tdef_vty_test(config)# timer tes T2 100
% Error: no timers found
tdef_vty_test(config)# timer te T2 100
-% Error: no timers found
+% Ambiguous command.
tdef_vty_test(config)# do show timer software