2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.stmt;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertTrue;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.yang.model.api.ExtensionDefinition;
17 * Test ANTLR4 grammar capability to parse unknown node in extension argument
21 * Note: Everything under unknown node is unknown node.
23 public class Bug1413Test extends AbstractYangTest {
25 public void test() throws Exception {
26 var extensions = assertEffectiveModelDir("/bugs/bug1413").findModules("bug1413").iterator().next()
27 .getExtensionSchemaNodes();
28 assertEquals(1, extensions.size());
30 ExtensionDefinition info = extensions.iterator().next();
31 assertEquals("text", info.getArgument());
32 assertTrue(info.isYinElement());