generated from codecrafters-io/tester-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup-local-testing.sh
executable file
·24 lines (22 loc) · 1.12 KB
/
setup-local-testing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
set -e
# Install dart
brew tap dart-lang/dart
brew install [email protected]
echo 'export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
dart --version
dart --disable-analytics
# Clone & compile craftinginterpreters
git clone https://github.com/munificent/craftinginterpreters.git
cd craftinginterpreters && make get
sed -i '' 's/Lox\.error(line, "Unexpected character\.");/Lox\.error(line, "Unexpected character: " + c);/g' java/com/craftinginterpreters/lox/Scanner.java
make java_chapters
cd ..
cp -r ./internal/test_helpers/jlox04/* ./craftinginterpreters/build/gen/chap04_scanning
cp -r ./internal/test_helpers/jlox06/* ./craftinginterpreters/build/gen/chap06_parsing
cp -r ./internal/test_helpers/jlox07/* ./craftinginterpreters/build/gen/chap07_evaluating
cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap08_statements
cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap09_control
cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap10_functions
cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap13_inheritance
make test