/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.apache.felix.gogo.jline;

import org.junit.Test;

public class ShellTest extends AbstractParserTest {


    @Test
    public void test() throws Exception {
        Context context = new Context();
        context.execute("a = \"foo\"");
        assertEquals("foo", context.get("a"));
        context.execute("a = $(echo bar)");
        assertEquals("bar", context.get("a"));
    }

}

@@ -839,16 +839,42 @@
 jline;%0A%0A
+import java.util.Arrays;%0A%0A
 import o
@@ -888,16 +888,16 @@
 t.Test;%0A
-
 %0Apublic 
@@ -973,16 +973,34 @@
 oid test
+AssignmentWithEcho
 () throw
@@ -1181,24 +1181,24 @@
 cho bar)%22);%0A
-
         asse
@@ -1239,10 +1239,385 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testJobIds() throws Exception %7B%0A        Context context = new Context();%0A        // TODO: not than in zsh, the same thing is achieved using%0A        // TODO:     $%7B$%7B$%7B(@f)%22$(jobs)%22%7D%25%5D*%7D#*%5C%5B%7D%0A        Object result = context.execute(%22sleep 1 & sleep 1 & $%7B$%7B$%7B(f)$(jobs)%7D%25'%5D*'%7D#'*%5C%5C%5B'%7D%22);%0A        assertEquals(Arrays.asList(%221%22, %222%22), result);%0A    %7D%0A%0A
 %7D%0A

Add a test for jobids