From 736a868895c39895f198adf46146925d4890aef8 Mon Sep 17 00:00:00 2001 From: PirxDanford Date: Thu, 3 Nov 2022 10:35:58 +0100 Subject: [PATCH] Use bash for syntax highlighting in the slides --- slides/2_reasons_and_examples.html | 13 +++++++------ slides/3_advanced_concepts.html | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/slides/2_reasons_and_examples.html b/slides/2_reasons_and_examples.html index 8545374..91fc6a7 100644 --- a/slides/2_reasons_and_examples.html +++ b/slides/2_reasons_and_examples.html @@ -46,7 +46,7 @@

Why?

Easy to get started

Once shunit2 is installed, writing tests is as easy as -

+						

 #!/bin/sh
 
 testForOneEqualsOne() {
@@ -98,9 +98,10 @@ 

Example Scenarios

Checking your own code

This scenario comes without example code, but with some additional reasoning.
Imagine you have a script that just does: -

-							#!/bin/sh
-							echo Hello World :-)
+						

+#!/bin/sh
+
+echo Hello World :-)
 						
Writing a test and running it, already provides the insight of:
    @@ -113,7 +114,7 @@

    Checking your own code

    Interoperability checks

    Even with the most simple scripts and common tools, there is always an uncertainty if something will work as expected. Especially if you do not have full control about where the code is running. -
    
    +						
    
     sed -i 's/hello/goodbye/' example
     sed -i.bak 's/hello/goodbye/' example
     						
    @@ -124,7 +125,7 @@

    Interoperability checks

    Binary availability

    This simple error cause has inflicted hours of lost time,
    as sometimes the clue is hidden deep in some error logs.
    Well, just write a test for it! -
    
    +						
    
     #!/bin/sh
     
     testAvailabilityBASH() {
    diff --git a/slides/3_advanced_concepts.html b/slides/3_advanced_concepts.html
    index 7c7ed01..ca45f43 100644
    --- a/slides/3_advanced_concepts.html
    +++ b/slides/3_advanced_concepts.html
    @@ -30,7 +30,7 @@ 

    Test Doubling

    In this example "some_command" will read the fake file and after some operations it should export the value "expected" into $ENVIRONMENT_VARIABLE. -
    
    +						
    
     testCommandWithFile() {
       . some_command /testdirectory/mock/FAKE_FILE >/dev/null 2>&1
       assertEquals "expected" "$ENVIRONMENT_VALUE"