-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#57 Treat \r\n new lines as equivalent to \n so the tests work.
- Loading branch information
1 parent
3a45e7b
commit 5c86536
Showing
6 changed files
with
115 additions
and
4 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
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
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,4 @@ | ||
lexer.*.bsh=bash | ||
fold=1 | ||
fold.comment=1 | ||
keywords.*.bsh=case cat do done echo else esac exit export fi find for if in set then while |
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,34 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
# ----------------------------------------------------------------------------- | ||
# Voluptatem dolore magnam eius quisquam eius dolor labore. Porro dolor amet ut. | ||
# Numquam labore amet modi. Dolorem velit numquam porro est quiquia ipsum quisquam. | ||
# Magnam consectetur est voluptatem aliquam adipisci. Sed dolorem quaerat quiquia. | ||
# ----------------------------------------------------------------------------- | ||
export PYTHONPATH="scripts:$PYTHONPATH" | ||
|
||
if [[ -z "$1" ]]; then | ||
PROJECT_DIR=$(rlwrap -S "Enter source path: " -e '' -i -o cat) | ||
PROJECT_PATH="$(pwd)/$PROJECT_DIR" | ||
else | ||
PROJECT_PATH="$(pwd)/${1}" | ||
fi | ||
|
||
OUT_FILE=${PROJECT_PATH}/testing.txt | ||
|
||
(cat<<EOF | ||
Last run $(date +'%Y-%m-%d') at $(date +'%H:%M:%S.%2N') | ||
EOF | ||
) > $OUT_FILE | ||
|
||
find "$PROJECT_PATH/src" -maxdepth 1 -type f |\ | ||
while read -r f; do | ||
{ | ||
python3 -c "print();print('='*50)";\ | ||
echo `basename "$f"` | tr -d 'x';\ | ||
python3 -c "print('='*50)";\ | ||
python3 "$f";\ | ||
} >> $OUT_FILE | ||
done | ||
|
||
INVALID_NUMBER=0#0000 |
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,35 @@ | ||
0 400 0 #!/usr/bin/env bash | ||
0 400 0 set -e | ||
2 400 0 + # ----------------------------------------------------------------------------- | ||
0 401 0 | # Voluptatem dolore magnam eius quisquam eius dolor labore. Porro dolor amet ut. | ||
0 401 0 | # Numquam labore amet modi. Dolorem velit numquam porro est quiquia ipsum quisquam. | ||
0 401 0 | # Magnam consectetur est voluptatem aliquam adipisci. Sed dolorem quaerat quiquia. | ||
0 401 0 | # ----------------------------------------------------------------------------- | ||
0 400 0 export PYTHONPATH="scripts:$PYTHONPATH" | ||
1 400 0 | ||
2 400 0 + if [[ -z "$1" ]]; then | ||
0 401 0 | PROJECT_DIR=$(rlwrap -S "Enter source path: " -e '' -i -o cat) | ||
0 401 0 | PROJECT_PATH="$(pwd)/$PROJECT_DIR" | ||
0 401 0 | else | ||
0 401 0 | PROJECT_PATH="$(pwd)/${1}" | ||
0 401 0 | fi | ||
1 400 0 | ||
0 400 0 OUT_FILE=${PROJECT_PATH}/testing.txt | ||
1 400 0 | ||
2 400 0 + (cat<<EOF | ||
0 401 0 | Last run $(date +'%Y-%m-%d') at $(date +'%H:%M:%S.%2N') | ||
0 401 0 | EOF | ||
0 400 0 ) > $OUT_FILE | ||
1 400 0 | ||
0 400 0 find "$PROJECT_PATH/src" -maxdepth 1 -type f |\ | ||
2 400 0 + while read -r f; do | ||
2 401 0 + { | ||
0 402 0 | python3 -c "print();print('='*50)";\ | ||
0 402 0 | echo `basename "$f"` | tr -d 'x';\ | ||
0 402 0 | python3 -c "print('='*50)";\ | ||
0 402 0 | python3 "$f";\ | ||
0 402 0 | } >> $OUT_FILE | ||
0 401 0 | done | ||
1 400 0 | ||
0 400 0 INVALID_NUMBER=0#0000 | ||
0 400 0 |
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,34 @@ | ||
{2}#!/usr/bin/env bash{0} | ||
{4}set{0} {8}-e{0} | ||
{2}# -----------------------------------------------------------------------------{0} | ||
{2}# Voluptatem dolore magnam eius quisquam eius dolor labore. Porro dolor amet ut.{0} | ||
{2}# Numquam labore amet modi. Dolorem velit numquam porro est quiquia ipsum quisquam.{0} | ||
{2}# Magnam consectetur est voluptatem aliquam adipisci. Sed dolorem quaerat quiquia.{0} | ||
{2}# -----------------------------------------------------------------------------{0} | ||
{4}export{0} {8}PYTHONPATH{7}={5}"scripts:$PYTHONPATH"{0} | ||
|
||
{4}if{0} {7}[[{0} {4}-z{0} {5}"$1"{0} {7}]];{0} {4}then{0} | ||
{8}PROJECT_DIR{7}={11}$(rlwrap -S "Enter source path: " -e '' -i -o cat){0} | ||
{8}PROJECT_PATH{7}={5}"$(pwd)/$PROJECT_DIR"{0} | ||
{4}else{0} | ||
{8}PROJECT_PATH{7}={5}"$(pwd)/${1}"{0} | ||
{4}fi{0} | ||
|
||
{8}OUT_FILE{7}={10}${PROJECT_PATH}{7}/{8}testing.txt{0} | ||
|
||
{7}({8}cat{12}<<EOF{13} | ||
Last run $(date +'%Y-%m-%d') at $(date +'%H:%M:%S.%2N') | ||
EOF{0} | ||
{7}){0} {7}>{0} {9}$OUT_FILE{0} | ||
|
||
{4}find{0} {5}"$PROJECT_PATH/src"{0} {7}-{8}maxdepth{0} {3}1{0} {7}-{8}type{0} {8}f{0} {7}|\{0} | ||
{4}while{0} {8}read{0} {8}-r{0} {8}f{7};{0} {4}do{0} | ||
{7}{{0} | ||
{8}python3{0} {8}-c{0} {5}"print();print('='*50)"{7};\{0} | ||
{4}echo{0} {11}`basename "$f"`{0} {7}|{0} {8}tr{0} {8}-d{0} {6}'x'{7};\{0} | ||
{8}python3{0} {8}-c{0} {5}"print('='*50)"{7};\{0} | ||
{8}python3{0} {5}"$f"{7};\{0} | ||
{7}}{0} {7}>>{0} {9}$OUT_FILE{0} | ||
{4}done{0} | ||
|
||
{8}INVALID_NUMBER{7}={1}0#0000{0} |