-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added a debug flag for emitting code
- Loading branch information
1 parent
6e3d672
commit 64eda1d
Showing
9 changed files
with
109 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*~ | ||
*swp | ||
.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
error_count=0 | ||
test_error() { | ||
(( error_count++ )) | ||
echo "$1" | ||
} | ||
|
||
test_done(){ | ||
if (( error_count == 0 )); then | ||
echo "Success" | ||
else | ||
echo "Failed " $error_count " tests" | ||
fi | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
. ../ticktick.sh | ||
. ./common.sh | ||
|
||
`` key = {"value": 1} `` | ||
|
||
[ "``key.value``" == "1" ] || test_error "Key Assignment wrong" | ||
``key.value.delete()`` | ||
[ -z "``key.value``" ] || test_error "Key Not Deleted" | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
. ../ticktick.sh | ||
|
||
# This is reference to issue (1), | ||
# (test case) e.g., parser goes to infinite loop on dicts | ||
|
||
# This should parse ok | ||
`` data = { "x" : "y" } `` | ||
|
||
# This is a bug in code, but | ||
# it should say so | ||
`` data = { "x" : "y", } `` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
for i in *.test.sh; do | ||
echo "$i {" | ||
./$i | sed "s/^/ /g" | ||
echo "}" | ||
echo | ||
done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
. ../ticktick.sh | ||
. ./common.sh | ||
|
||
DATA=`cat data.json` | ||
|
||
tickParse "$DATA" | ||
|
||
[ "``pathname``" == "/echo/request.json" ] || test_error "Pathname wrong" | ||
[ "``headers["user-agent"]``" == "curl/7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3" ] || test_error "User-agent wrong" | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters