/*
 * Copyright 2015 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.j2cl.transpiler.integration.stringescapecodes;

/**
 * Test String escape codes.
 */
public class Main {
  public static void main(String... args) {
    testGeneralEscapes();
    testUnicodeEscapes();
  }

  private static void testUnicodeEscapes() {
    assert "\uD800\uDF46".equals("𐍆");
    assert "\u0000".length() == 1;
  }

  private static void testGeneralEscapes() {
    assert "".length() == 0;
    assert "\b".length() == 1;
    assert "\f".length() == 1;
    assert "\n".length() == 1;
    assert "\r".length() == 1;
    assert "\t".length() == 1;
    assert "\\".length() == 1;
    assert "\"".length() == 1;
    assert "\'".length() == 1;
  }
}

@@ -804,16 +804,40 @@
 apes();%0A
+    testOctalEscapes();%0A
   %7D%0A%0A  p
@@ -1282,11 +1282,222 @@
 = 1;%0A  %7D
+%0A%0A  private static void testOctalEscapes() %7B%0A    // TODO(b/34685920): uncomment when octal escape codes are transformed to avoid jscompiler%0A    // strict check.%0A    // assert %22%5Cu001b%5B31m%22.equals(%22%5C033%5B31m%22);%0A  %7D
 %0A%7D%0A

Add (disabled) test for strings with octal escapes.