3 . $(dirname $0)/wvtest.sh
5 WVSTART "Without any parameters do nothing"
8 WVSTART "argv[0] in forb_main() contains the name of the library"
9 WVFAIL sh -c 'forbrun libtest_obj.so 2> error'
10 WVPASSEQ "$(cat error)" "Usage: libtest_obj.so <string>"
12 WVSTART "Both server and client in a single process"
13 WVPASS sh -c 'forbrun libtest_obj.so "Hello" -- libtest_client.so > output'
14 WVPASSEQ "$(cat output)" "Hello"
16 WVSTART "Server and client in separate processes"
17 # Run server on background
19 WVPASS sh -c 'forbrun --daemon=test.pid libtest_obj.so "Hello" > output'
20 WVPASS test -f test.pid
23 WVPASS forbrun libtest_client.so
24 WVPASS kill $(cat test.pif)
26 # Test whether the server was called
27 WVPASSEQ "$(cat output)" "Hello"