11/*
2+ * Elemental
3+ * Copyright (C) 2024, Evolved Binary Ltd
4+ *
5+ * admin@evolvedbinary.com
6+ * https://www.evolvedbinary.com | https://www.elemental.xyz
7+ *
8+ * This library is free software; you can redistribute it and/or
9+ * modify it under the terms of the GNU Lesser General Public
10+ * License as published by the Free Software Foundation; version 2.1.
11+ *
12+ * This library is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+ * Lesser General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU Lesser General Public
18+ * License along with this library; if not, write to the Free Software
19+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+ *
21+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
22+ * The original license header is included below.
23+ *
24+ * =====================================================================
25+ *
226 * eXist-db Open Source Native XML Database
327 * Copyright (C) 2001 The eXist-db Authors
428 *
@@ -90,6 +114,12 @@ public void appendFromEmpty() {
90114 assertEquals ("/a/b/c/d" , path .toString ());
91115 path .append (new NodePath (null , "/1/2/3" ));
92116 assertEquals ("/a/b/c/d/1/2/3" , path .toString ());
117+
118+ path = new NodePath ();
119+ path .addComponent (NodePath .SKIP );
120+ path .addComponent (new QName ("lemma" , "" , "" , ElementValue .ATTRIBUTE ));
121+ assertEquals ("//@lemma" , path .toString ());
122+
93123 }
94124
95125 @ Test
@@ -108,6 +138,10 @@ public void appendFromNonEmpty() {
108138 assertEquals ("/a/b/c/d" , path .toString ());
109139 path .append (new NodePath (null , "/1/2/3" ));
110140 assertEquals ("/a/b/c/d/1/2/3" , path .toString ());
141+
142+ path = new NodePath (NodePath .SKIP );
143+ path .addComponent (new QName ("lemma" , "" , "" , ElementValue .ATTRIBUTE ));
144+ assertEquals ("//@lemma" , path .toString ());
111145 }
112146
113147 @ Test
0 commit comments