Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4535183BF for ; Thu, 31 Dec 2015 17:09:47 +0000 (UTC) Received: (qmail 47296 invoked by uid 500); 31 Dec 2015 17:09:47 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 47248 invoked by uid 500); 31 Dec 2015 17:09:47 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 47237 invoked by uid 99); 31 Dec 2015 17:09:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2015 17:09:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 41B85E2C5A; Thu, 31 Dec 2015 17:09:47 +0000 (UTC) From: joshelser To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request: ACCUMULO-3734 unescape auths when using Aut... Content-Type: text/plain Message-Id: <20151231170947.41B85E2C5A@git1-us-west.apache.org> Date: Thu, 31 Dec 2015 17:09:47 +0000 (UTC) Github user joshelser commented on a diff in the pull request: https://github.com/apache/accumulo/pull/59#discussion_r48663556 --- Diff: core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java --- @@ -113,6 +123,31 @@ public void testQuote() { } @Test + public void testUnescape() { + assertEquals("a\"b", VisibilityEvaluator.unescape(new ArrayByteSequence("a\\\"b")).toString()); + assertEquals("a\\b", VisibilityEvaluator.unescape(new ArrayByteSequence("a\\\\b")).toString()); + assertEquals("a\\\"b", VisibilityEvaluator.unescape(new ArrayByteSequence("a\\\\\\\"b")).toString()); + assertEquals("\\\"", VisibilityEvaluator.unescape(new ArrayByteSequence("\\\\\\\"")).toString()); + assertEquals("a\\b\\c\\d", VisibilityEvaluator.unescape(new ArrayByteSequence("a\\\\b\\\\c\\\\d")).toString()); + + try { + VisibilityEvaluator.unescape(new ArrayByteSequence("a\\b")); + fail(); --- End diff -- An assertion message for the `fail()`'s would be nice. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---