Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 1&1 Internet AG, 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 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 net.oneandone.jasmin.model;
 import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static;
 public class ReferencesTest {
     private static final String UMLAUTE = "\"\u00f6\u00d6\u00fc\";"// öÖü
     private World world = new World();
     public void jsNormal() throws Exception {
         assertEquals("a;b;"js("a; b;"));
     public void jsBroken() throws Exception {
         try {
         } catch (IOException e) {
             assertTrue(e.getMessage(), e.getMessage().toLowerCase().contains("unterminated string literal"));
     public void umlaut() throws Exception {
     public void cssNormal() throws Exception {
         assertEquals("#sant .notes{font-size:11px;}"css("#sant .notes {\n\n        font-size: 11px;    \n\n}"));
     @Test(expected = IOException.class)
     public void cssBroken() throws Exception {
     public void sass() throws Exception {
                 css("$blue: \"abc\";"".dot {\n"
                         + "  color: $blue\n"
                         + "}\n")
     private String js(String ... sourcesthrows IOException {
         return minimize(.sources);
     private String css(String ... sourcesthrows IOException {
         return minimize(.sources);
     private String minimize(MimeType typeString ... sourcesthrows IOException {
         Node dest;
         References references;
         dest = .memoryNode();
         try (Writer writer = dest.createWriter()) {
             references = new References(typetrue);
             for (String source : sources) {
         return dest.readString();
New to GrepCode? Check out our FAQ X