Commit 833626f2 authored by H. Fischer's avatar H. Fischer Committed by Jakob Moser
Browse files

Try implementing another exercise

parent 03d6fd9d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -210,6 +210,18 @@ export const pooltest = test("Pooltest Sommersemester 2022", async function () {
    
        this.verify('if [ -d /tmp/computational/linguistics/ ]; then echo "yes"; else echo "no"; fi').hasOutput("yes")
    })
    
    this.exercise("Löschen und Umbenennen von Ordnern und Dateien", async function () {
        this.describe(`Gehe in den Ordner "/resources/stuff". Benenne die Datei "a_file.png" zu "b_file.png" um, 
        und lösche den Unterordner "to/" mit all seinen Inhalten.`)
    
        await this.prepareWith("mkdir -p /resources/stuff/to/delete && touch /resources/stuff/a_file.png && cd /resources/stuff/to/delete && for i in {0..10}; do touch 'trashfile$i.txt'; done && cd /root")
    
        await this.manualConfirmation()
    
        this.verify('if \( ! [ -d /resources/stuff/to] \) && [ -f /resources/stuff/b_file.png ]; then echo "yes"; else echo "no"; fi').hasOutput("yes")
    })
    
    // 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.
})