#!/bin/sh

set -e

SRC=`pwd`
cd $ADTTMP
gcc -I$SRC $SRC/stest.c -lxpa -ostest
./stest > stest.log 2>&1 &
sleep 0.2
FILE=$SRC/stest.c
cat $FILE | xpaset xpa

xpaget xpa buf | diff -uw $FILE -

xpaget xpa Exit

cat stest.log

