Loading static/js/exercises.mjs +11 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,17 @@ export const pooltest = test("Pooltest Sommersemester 2022", async function () { this.verify('if ( ! [ -d /resources/stuff/to ] && [ -f /resources/stuff/b_file.png ] ); then echo "yes"; else echo "no"; fi').hasOutput("yes") }) this.exercise("Textdateien lesen und schreiben", async function () { this.describe(`Lasse dir den Inhalt der Datei "reverse.txt" anzeigen und schreibe den Inhalt in umgekehrter Reihenfolge in eine neue Datei mit dem Namen "correct.txt"`) await this.prepareWith("echo 'ILOC' >> reverse.txt") await this.manualConfirmation() this.verify("cat correct.txt").hasOutput("COLI") }) // To add another exercise, simply copy and paste an exercise(...) block from above and adjust it. // Order is respected, so you can e.g. order the exercises by increasing difficulty. }) Loading
static/js/exercises.mjs +11 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,17 @@ export const pooltest = test("Pooltest Sommersemester 2022", async function () { this.verify('if ( ! [ -d /resources/stuff/to ] && [ -f /resources/stuff/b_file.png ] ); then echo "yes"; else echo "no"; fi').hasOutput("yes") }) this.exercise("Textdateien lesen und schreiben", async function () { this.describe(`Lasse dir den Inhalt der Datei "reverse.txt" anzeigen und schreibe den Inhalt in umgekehrter Reihenfolge in eine neue Datei mit dem Namen "correct.txt"`) await this.prepareWith("echo 'ILOC' >> reverse.txt") await this.manualConfirmation() this.verify("cat correct.txt").hasOutput("COLI") }) // To add another exercise, simply copy and paste an exercise(...) block from above and adjust it. // Order is respected, so you can e.g. order the exercises by increasing difficulty. })