Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
case $1 in
|
||||
foo) echo "FOOOOO!" ;;
|
||||
bar) echo "BAAAAAR!" ;;
|
||||
baz) echo "BAAAZZZ!" ;;
|
||||
*) echo "WHATEVER!"
|
||||
esac
|
||||
@@ -0,0 +1,8 @@
|
||||
for i in 0..3
|
||||
do
|
||||
echo "i = $i"
|
||||
done
|
||||
|
||||
if [[ true ]]; then
|
||||
echo "Truth!"
|
||||
fi
|
||||
@@ -0,0 +1,26 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
"github.com/localhots/penny/lexer"
|
||||
"github.com/localhots/penny/parser"
|
||||
)
|
||||
|
||||
func TestWorld(t *testing.T) {
|
||||
b, err := ioutil.ReadFile("example.sh")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
lex := lexer.NewLexer(b)
|
||||
p := parser.NewParser()
|
||||
st, err := p.Parse(lex)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
pretty.Println(st)
|
||||
}
|
||||
Reference in New Issue
Block a user