summaryrefslogtreecommitdiff
path: root/tests/05-detour.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/05-detour.test')
-rw-r--r--tests/05-detour.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/05-detour.test b/tests/05-detour.test
new file mode 100644
index 0000000..c46ef2f
--- /dev/null
+++ b/tests/05-detour.test
@@ -0,0 +1,11 @@
+#!/bin/sh
+source ./boilerplate.sh
+
+elfucli --input $BUILDDIR/putsmainsub \
+ --reladd $BUILDDIR/puts_noarg.o \
+ --detour sub,puts_noarg \
+ --output $BUILDDIR/putsmainsub-with-puts-noarg-detour
+test_check_retval
+
+$BUILDDIR/putsmainsub-with-puts-noarg-detour | grep -q "puts_noarg() is returning."
+test_check_retval