From 4915128605a07d7c82fda681596d4da9746e3f97 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 09 Mar 2007 19:06:23 +0000
Subject: [PATCH] Update the argument parser so that it will always treat "-?" as as request to see the usage information. Also, allow short identifiers to be requested using a forward slash in addition to a single dash (e.g., "/?" will be treated the same as "-?").
---
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/EncodePasswordTestCase.java | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/EncodePasswordTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/EncodePasswordTestCase.java
index c70da58..1d4f8e9 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/EncodePasswordTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/EncodePasswordTestCase.java
@@ -755,16 +755,21 @@
/**
- * Tests the EncodePassword tool with the "--help" option.
+ * Tests the EncodePassword tool with the help options.
*/
@Test()
public void testHelp()
{
- String[] args =
- {
- "--help"
- };
+ String[] args = { "--help" };
+ assertEquals(EncodePassword.encodePassword(args, false, null, null), 0);
+ args = new String[] { "-H" };
+ assertEquals(EncodePassword.encodePassword(args, false, null, null), 0);
+
+ args = new String[] { "-?" };
+ assertEquals(EncodePassword.encodePassword(args, false, null, null), 0);
+
+ args = new String[] { "/?" };
assertEquals(EncodePassword.encodePassword(args, false, null, null), 0);
}
}
--
Gitblit v1.10.0