summaryrefslogtreecommitdiffstats
path: root/fluent-bit/tests/lib/shunit2/doc/design_doc.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /fluent-bit/tests/lib/shunit2/doc/design_doc.txt
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fluent-bit/tests/lib/shunit2/doc/design_doc.txt')
-rw-r--r--fluent-bit/tests/lib/shunit2/doc/design_doc.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/fluent-bit/tests/lib/shunit2/doc/design_doc.txt b/fluent-bit/tests/lib/shunit2/doc/design_doc.txt
new file mode 100644
index 000000000..24d41ff19
--- /dev/null
+++ b/fluent-bit/tests/lib/shunit2/doc/design_doc.txt
@@ -0,0 +1,34 @@
+Design Doc for shUnit
+
+shUnit is based upon JUnit. The initial ideas for the script came from the book
+"Pragmatic Unit Testing - In Java with JUnit" by Andrew Hunt and David Thomas.
+
+The script was written to perform unit testing for log4sh. log4sh had grown
+enough that it was becoming difficult to easily test and and verify that the
+tests passed for the many different operating systems on which it was being
+used.
+
+The functions in shUnit are meant to match those in JUnit as much as possible
+where shell allows. In the initial version, there will be no concept of
+exceptions (as normal POSIX shell has no concept of them) but attempts to trap
+problems will be done.
+
+Programatic Standards:
+
+* SHUNIT_TRUE - public global constant
+* __SHUNIT_SHELL_FLAGS - private global constant
+* __shunit_oldShellFlags - private global variable
+
+* assertEquals - public unit test function
+* shunit_publicFunc - public shUnit function; can be called from parent unit
+ test script
+* _shunit_privateFunc - private shUnit function; should not be called from
+ parent script. meant for internal use by shUnit
+
+* _su_myVar - variable inside a public function. prefixing with '_su_' to
+ reduce the chances that a variable outside of shUnit will be overridden.
+* _su__myVar - variable inside a private function. prefixing with '_su__' to
+ reduce the chances that a variable in a shUnit public function, or a variable
+ outside of shUnit will be overridden.
+
+$Revision$