Fix for [Issue 1401] revoke support for '/' as option prefix
| | |
| | | } |
| | | } |
| | | } |
| | | else if (arg.startsWith("-") || arg.startsWith("/")) |
| | | else if (arg.startsWith("-")) |
| | | { |
| | | // This indicates that we are using the 1-character name to reference |
| | | // the argument. It may be in any of the following forms: |
| | | // -n |
| | | // -nvalue |
| | | // -n value |
| | | if (arg.equals("-") || arg.equals("/")) |
| | | if (arg.equals("-")) |
| | | { |
| | | int msgID = MSGID_ARGPARSER_INVALID_DASH_AS_ARGUMENT; |
| | | String message = getMessage(msgID); |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (arg.startsWith("-") || arg.startsWith("/")) |
| | | else if (arg.startsWith("-")) |
| | | { |
| | | // This indicates that we are using the 1-character name to reference |
| | | // the argument. It may be in any of the following forms: |
| | | // -n |
| | | // -nvalue |
| | | // -n value |
| | | if (arg.equals("-") || arg.equals("/")) |
| | | if (arg.equals("-")) |
| | | { |
| | | int msgID = MSGID_SUBCMDPARSER_INVALID_DASH_AS_ARGUMENT; |
| | | String message = getMessage(msgID); |
| | |
| | | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(EncodePassword.encodePassword(args, false, null, null), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(EncodePassword.encodePassword(args, false, null, null), 0); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(LDAPCompare.mainCompare(args, false, null, null), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(LDAPCompare.mainCompare(args, false, null, null), 0); |
| | | } |
| | | } |
| | | |
| | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(LDAPDelete.mainDelete(args, false, null, null), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(LDAPDelete.mainDelete(args, false, null, null), 0); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(LDAPModify.mainModify(args, false, null, null), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(LDAPModify.mainModify(args, false, null, null), 0); |
| | | } |
| | | } |
| | | |
| | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(LDAPPasswordModify.mainPasswordModify(args, false, null, null), |
| | | 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(LDAPPasswordModify.mainPasswordModify(args, false, null, null), |
| | | 0); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(LDAPSearch.mainSearch(args, false, null, null), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(LDAPSearch.mainSearch(args, false, null, null), 0); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(LDIFDiff.mainDiff(args, true), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(LDIFDiff.mainDiff(args, true), 0); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | args = new String[] { "-?" }; |
| | | assertEquals(ListBackends.listBackends(args, false, null, null), 0); |
| | | |
| | | args = new String[] { "/?" }; |
| | | assertEquals(ListBackends.listBackends(args, false, null, null), 0); |
| | | } |
| | | } |
| | | |