Skip to content

Commit

Permalink
Merge pull request #11 from ourPLCC/akshar5/tests-not-able-to-be-ran-10
Browse files Browse the repository at this point in the history
Update Path For Tests
  • Loading branch information
StoneyJackson authored Mar 27, 2024
2 parents 277f6e6 + 1b7857b commit 7efcbc7
Show file tree
Hide file tree
Showing 33 changed files with 45 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ABC/tests/bear-fuzzy-wuzzy/ABC.expected2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


2 matches:
bear(fuzzy)
bear(wuzzy)

4 changes: 3 additions & 1 deletion ABC/tests/bear-fuzzy-wuzzy/ABCtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd ABC
plcc grammar
javac -cp abcdatalog.jar Java/*.java
Expand All @@ -14,5 +15,6 @@ teardown() {
@test "ABC bear-fuzzy-wuzzy" {
RESULT="$(java -cp abcdatalog.jar:Java Rep -n < ./tests/bear-fuzzy-wuzzy/ABC.input)"
expected_output=$(< "./tests/bear-fuzzy-wuzzy/ABC.expected")
[[ "$RESULT" == "$expected_output" ]]
expected_output2=$(< "./tests/bear-fuzzy-wuzzy/ABC.expected2")
[[ "$RESULT" == "$expected_output" || "$RESULT" == "$expected_output2" ]]
}
1 change: 1 addition & 0 deletions ARRAY/tests/recursive/ARRAYtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd ARRAY
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions BF/tests/random/BFtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd BF
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions CHAR/tests/random/CHARtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd CHAR
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions GINGER/tests/ginger/GINGERtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd GINGER
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions HANDLER/tests/list/HANDLERtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd HANDLER
plccmk -c grammar > /dev/null
}
Expand Down
3 changes: 2 additions & 1 deletion INFIX/tests/add_and_multiply/INFIXtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd INFIX
plccmk -c grammar > /dev/null
}
Expand All @@ -11,7 +12,7 @@ teardown() {
}

@test "INFIX add_and_multiply" {
skip "Doesn't behave like we expect. Help please!"
skip "Intentionally not implemented"
RESULT="$(rep -n < ./tests/add_and_multiply/INFIX.input)"

expected_output=$(< "./tests/add_and_multiply/INFIX.expected")
Expand Down
1 change: 1 addition & 0 deletions LAMBDA/tests/random/LAMBDAtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd LAMBDA
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions LAMBDAQ/tests/free/LAMBDAQtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd LAMBDAQ
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions LIST/tests/chooser/LISTtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd LIST
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions LON/tests/parse/LONtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd LON
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions LON2/tests/print/LON2test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd LON2
plccmk -c grammar > /dev/null
}
Expand Down
3 changes: 2 additions & 1 deletion LONN/tests/min/LONNtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd LONN
plccmk -c grammar > /dev/null
}
Expand All @@ -11,7 +12,7 @@ teardown() {
}

@test "LONN min" {
skip "Language not implemented minimun number is always 0"
skip "Intentionally not implemented"
RESULT="$(rep -n < ./tests/min/LONN.input)"

expected_output=$(< "./tests/min/LONN.expected")
Expand Down
1 change: 1 addition & 0 deletions NAME/tests/let-proc/NAMEtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd NAME
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions NEED/tests/let/NEEDtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd NEED
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions OBJ/tests/class/OBJtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd OBJ
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions PROP/tests/class-property/PROPtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd PROP
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions RANDSCONT/tests/letrec/RANDSCONTtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd RANDSCONT
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions REF/tests/let/REFtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd REF
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions REFCONT/tests/odd_even/REFCONTtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd REFCONT
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions SET/tests/let/SETtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd SET
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions THREADCONT/tests/concurrent/THREADCONTtest.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd THREADCONT
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions TYPE0/tests/boolean/TYPE0test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd TYPE0
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions TYPE1/tests/proc-types/TYPE1test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd TYPE1
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V0/tests/nested-prims/V0test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V0
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V1/tests/nested-prims/V1test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V1
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V2/tests/nested-ifs/V2test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V2
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V3/tests/let/V3test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V3
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V4/tests/proc/V4test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V4
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V5/tests/letrec/V5test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V5
plccmk -c grammar > /dev/null
}
Expand Down
1 change: 1 addition & 0 deletions V6/tests/define/V6test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
cd "$(git rev-parse --show-toplevel)"
cd V6
plccmk -c grammar > /dev/null
}
Expand Down
4 changes: 4 additions & 0 deletions bin/test.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env bash

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
PROJECT_ROOT="$( cd "${SCRIPT_DIR}/.." &> /dev/null && pwd )"
cd "${PROJECT_ROOT}"

bats --recursive .

0 comments on commit 7efcbc7

Please sign in to comment.