vty: Don't match negative values on purely positive ranges
Without this patch, for instance having a range 0-ULONG_MAX would match
if someones types value -3, which would be converted to unsigned but
that's clearly what is expected here from user point of view.
Change-Id: Ia95f6314a2dd3f94d21fc219cf69bb8d39b8e7f0
diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c
index a7aef11..b2d34ad 100644
--- a/tests/vty/vty_test.c
+++ b/tests/vty/vty_test.c
@@ -508,7 +508,7 @@
OSMO_ASSERT(do_vty_command(vty, "numeric-range 0") == CMD_SUCCESS);
OSMO_ASSERT(do_vty_command(vty, "numeric-range 40000") == CMD_SUCCESS);
- OSMO_ASSERT(do_vty_command(vty, "numeric-range -400000") == CMD_SUCCESS);
+ OSMO_ASSERT(do_vty_command(vty, "numeric-range -400000") == CMD_ERR_NO_MATCH);
destroy_test_vty(&test, vty);
}