#!/bin/sh

# Stops the execution, if a command has an error
set -e

# Temporary file to store the retrieved results
ACTUAL="found-plugins.csv"

# Expected result
TARGET="./debian/tests/testfiles/regripper-plugins.csv"

# Run regripper to list all plugins in .csv-format
regripper -l -c > ${ACTUAL}

# Fail if, there are lines, that are in $ACTUAL but not in $TARGET
if [ $(combine ${ACTUAL} not ${TARGET} | wc -l) -gt 0 ]
   then
       exit 1
fi

rm ${ACTUAL}
exit 0
