2 * Copyright (c) 2017 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.parser.stmt.rfc7950;
10 import static org.hamcrest.CoreMatchers.startsWith;
12 import org.junit.Test;
13 import org.opendaylight.yangtools.yang.stmt.AbstractYangTest;
15 public class Bug6886Test extends AbstractYangTest {
17 public void yang11UnquotedStrTest() {
18 assertSourceException(startsWith("YANG 1.1: unquoted string (illegalchars\"test1) contains illegal characters"),
19 "/rfc7950/bug6886/yang11/foo.yang");
23 public void yang11UnquotedStrTest2() {
24 assertSourceException(startsWith("YANG 1.1: unquoted string (illegalchars'test2) contains illegal characters"),
25 "/rfc7950/bug6886/yang11/foo2.yang");
29 public void yang11DoubleQuotedStrTest() {
30 assertSourceException(startsWith("YANG 1.1: illegal double quoted string "
31 + "(i\\\\\\\\l\\nl\\te\\\"\\galcharstest1). In double quoted string the backslash must be followed "
32 + "by one of the following character [n,t,\",\\], but was 'g'."),
33 "/rfc7950/bug6886/yang11/foo3.yang");
37 public void yang10UnquotedStrTest() {
38 assertEffectiveModel("/rfc7950/bug6886/yang10/foo.yang");
42 public void yang10UnquotedStrTest2() {
43 assertEffectiveModel("/rfc7950/bug6886/yang10/foo2.yang");
47 public void yang10DoubleQuotedStrTest() {
48 assertEffectiveModel("/rfc7950/bug6886/yang10/foo3.yang");