Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Beginnings of assert apidoc.

  • Loading branch information...
commit 6b2cad4692288abb8dd2b7408951cb07a146faf7 1 parent 1f33d2e
@wayneeseguin wayneeseguin authored
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
6 bin/assert/string
@@ -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
28 bin/assert/variable
@@ -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
1  shell/includes
@@ -17,3 +17,4 @@ api/user
api/variables
api/vcs
api/json
+api/assert
Please sign in to comment.
Something went wrong with that request. Please try again.