Permalink
Browse files

Beginnings of assert apidoc.

  • Loading branch information...
wayneeseguin committed Nov 21, 2011
1 parent 1f33d2e commit 6b2cad4692288abb8dd2b7408951cb07a146faf7
Showing with 35 additions and 0 deletions.
  1. +6 −0 bin/assert/string
  2. +28 −0 bin/assert/variable
  3. +1 −0 shell/includes
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -v # Turn on verbose logging, so that the following will present a tutorial.
+
+# assert module api is loaded with the line 'api/assert' in shell/includes.
+
View
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -v # Turn on verbose logging, so that the following will present a tutorial.
+
+# assert module api is loaded with the line 'api/assert' in shell/includes.
+
+typeset my_variable
+
+my_variable="three"
+
+log step "checking if my variable is set to three"
+
+if assert variable my_variable equals three
+then
+ log step success
+else
+ log step fail
+fi
+
+log step "checking if my variable is set to four"
+
+if assert variable my_variable equals four
+then
+ log step success
+else
+ log step fail
+fi
+
View
@@ -17,3 +17,4 @@ api/user
api/variables
api/vcs
api/json
+api/assert

0 comments on commit 6b2cad4

Please sign in to comment.