Skip to content

Commit

Permalink
Use bash for syntax highlighting in the slides
Browse files Browse the repository at this point in the history
  • Loading branch information
PirxDanford committed Nov 3, 2022
1 parent f2a88a5 commit 736a868
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions slides/2_reasons_and_examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>Why?</h1>
<section>
<h1>Easy to get started</h1>
Once shunit2 is installed, writing tests is as easy as
<pre><code>
<pre class="bash"><code>
#!/bin/sh

testForOneEqualsOne() {
Expand Down Expand Up @@ -98,9 +98,10 @@ <h1>Example Scenarios</h1>
<h4>Checking your own code</h4>
<nobr>This scenario comes without example code, but with some additional reasoning.</nobr><br>
Imagine you have a script that just does:
<pre><code>
#!/bin/sh
echo Hello World :-)
<pre class="bash"><code>
#!/bin/sh

echo Hello World :-)
</code></pre>
Writing a test and running it, already provides the insight of:<br>
<ul>
Expand All @@ -113,7 +114,7 @@ <h4>Checking your own code</h4>
<section>
<h4>Interoperability checks</h4>
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.
<pre><code>
<pre class="bash"><code>
sed -i 's/hello/goodbye/' example
sed -i.bak 's/hello/goodbye/' example
</code></pre>
Expand All @@ -124,7 +125,7 @@ <h4>Interoperability checks</h4>
<h4>Binary availability</h4>
This simple error cause has inflicted hours of lost time,<br>as sometimes the clue is hidden deep in some error logs.<br>
Well, just write a test for it!
<pre><code>
<pre class="bash"><code>
#!/bin/sh

testAvailabilityBASH() {
Expand Down
2 changes: 1 addition & 1 deletion slides/3_advanced_concepts.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h4>Test Doubling</h4>
</section>
<section>
In this example "some_command" will read the fake file and after some operations it should export the value "expected" into $ENVIRONMENT_VARIABLE.
<pre><code>
<pre class="bash"><code>
testCommandWithFile() {
. some_command /testdirectory/mock/FAKE_FILE >/dev/null 2>&1
assertEquals "expected" "$ENVIRONMENT_VALUE"
Expand Down

0 comments on commit 736a868

Please sign in to comment.