#!/bin/sh
#
# Test the VLC bittorrent module.

set -e

retval=0
cd $ADTTMP

if type valgrind ; then
    VALGRIND=valgrind
else
    VALGRIND=
fi

if $VALGRIND vlc --list | grep -q bittorrent; then
    echo "success: vlc found bittorrent module"
else
    echo "success: vlc did not find bittorrent module"
    echo "error: vlc reported an error"
    retval=1
fi

# Should figure out a way to test playing a torrent stream, for example using
src=https://archive.org/download/CopyingIsNotTheft1080p/CopyingIsNotTheft1080p_archive.torrent

exit $retval
