Skip to content

Commit 31cede5

Browse files
committed
merge
2 parents 765da5b + 12e45c3 commit 31cede5

File tree

5 files changed

+4
-2
lines changed

5 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The virtual machines in this section are SECD-style and follow a description in
6565

6666
For testing your Source programs, you need `node` and `yarn`.
6767

68-
Write your test cases in a folder `__tests__` in each `src` subfolder. The name of the file specifies the targeted Source of your test case. For example, if `src/steppers/source-0.js` is the Source, a test case might be `src/steppers/__tests__/source-0.js.test1`.
68+
Write your test cases in a folder `__tests__` in each `src` subfolder. The name of the file specifies the targeted Source of your test case. For example, if `src/steppers/source-0.js` is the Source, a test case might be `src/steppers/__tests__/source-0.test1.js`.
6969

7070
Each test case is appended to your Source, and then run with `js-slang` (using Source §4). The last line of the test case is a `//` comment that must contain the expected result. For example, a stepper test case may be:
7171
```
@@ -81,6 +81,7 @@ Run all test cases by typing:
8181
```
8282
% yarn test
8383
```
84+
[Integration of the `test` script with `src/test/framework/` is pending; any help appreciated.]
8485

8586
# License
8687

scripts/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ main() {
6262
if [ -d "$DIR/__tests__" ]
6363
then
6464
# call test_source on each test case in __tests__
65-
for i in "$DIR/__tests__/$(basename ${s})"*
65+
for i in "$DIR/__tests__/$(basename ${s} .js)".*
6666
do
6767
test_source $s $i
6868
done
@@ -74,6 +74,7 @@ main() {
7474
test_source_framework $TEST_PATH
7575
fi
7676
fi
77+
7778
done
7879
}
7980

0 commit comments

Comments
 (0)