--- /dev/null
+Automated testing
+=================
+
+centaur comes with a suite of automated tests. Run
+ make check
+in the top-level directory to build elfucli and run the tests.
+
+Temporary files will be created in tests/build/ and cleaned
+up on 'make clean'.
+
+See the test scripts themselves for more specific documentation.
#!/bin/sh
+
+# Test if elfu can clone a given x86-32 executable in the way expected
+# by comparing it to a reference output.
+
source ./boilerplate.sh
elfucli --input reference/putsmain32 \
#!/bin/sh
+
+# Test if elfu can clone a given x86-64 executable in the way expected
+# by comparing it to a reference output.
+
source ./boilerplate.sh
elfucli --input reference/putsmain64 \
#!/bin/sh
+
+# Test if elfu can inject a x86-32 object file into an x86-32
+# executable. Since both are given, we can compare the output to a
+# reference file.
+
source ./boilerplate.sh
elfucli --input reference/putsmain32 \
#!/bin/sh
+
+# Test if elfu can inject a x86-64 object file into an x86-64
+# executable. Since both are given, we can compare the output to a
+# reference file.
+
source ./boilerplate.sh
elfucli --input reference/putsmain64 \
#!/bin/sh
+
+# 1. Inject a freshly built object file into a fresh executable.
+# Both use a dynamically loaded function.
+# 2. Detour execution from a function in the executable to a function
+# originating from the object file.
+# 3. Check if the new executable prints the expected changed output.
+
source ./boilerplate.sh
elfucli --input $BUILDDIR/putsmainsub \
#!/bin/sh
+
+# 1. Inject a freshly built object file with a 64 KB data section into
+# a fresh executable.
+# 2. Check if the new executable is still functional.
+
source ./boilerplate.sh
elfucli --input $BUILDDIR/putsmain \
#!/bin/sh
+
+# 1. Inject a freshly built object file into a fresh executable.
+# Both use a dynamically loaded function and global variable.
+# 2. Detour execution from a function in the executable to a function
+# originating from the object file.
+# 3. Check if the new executable prints the expected changed output.
+
source ./boilerplate.sh
elfucli --input $BUILDDIR/putsmainsubglobal \
#!/bin/sh
+
+# 1. Inject a freshly built object file with a 256 MB data section
+# into a fresh executable.
+# 2. Check if the new executable is still functional.
+
source ./boilerplate.sh
elfucli --input $BUILDDIR/putsmain \