nus-cs2113-AY2122S2 / forum

3 stars 2 forks source link

runtest.sh file not working #34

Closed BradenTeo closed 2 years ago

BradenTeo commented 2 years ago

Hi, I'm having some trouble running the runtest.sh file. After editing the runtest.sh and runtest.bat files as shown in Week 4's lecture, I still encountered this error. image

My file tree is as shown: image

And these are the parts I edited in my runtest.sh file:

if ! javac -cp ../src/main/java -Xlint:none -d ../bin ..\src\main\java\alexis\exceptions\*.java ..\src\main\java\alexis\main\*.java ..\src\main\java\alexis\task\*.java
then
    echo "********** BUILD FAILURE **********"
    exit 1
fi
java -classpath ../bin alexis.main.Main < input.txt > ACTUAL.TXT

Did I miss out something somewhere?

okkhoy commented 2 years ago

If you are using the runtest.sh (shell) file:

\src\main\java\alexis\exceptions\*.java should be /src/main/java/alexis/exceptions/*.java

BradenTeo commented 2 years ago

Ohh, it works. So if I use .sh, it is "/" and if I use .bat it is "\". Thank you!