#! /bin/sh

set -e

. ${srcdir}/test.lib.sh

tl_plan 4

# Test that calling --help works
${top_builddir}/src/dh-exec --help | \
        tl_expect_match "dh-exec --help works" \
                         "Scripts to help with executable debhelper files"
tl_next

# Test that calling --version works
${top_builddir}/src/dh-exec --version | \
        tl_expect_match "dh-exec --version works" \
                        "This is free software"
tl_next

# Test that --no-act works
${top_builddir}/src/dh-exec --no-act random.install | \
        tl_expect_match "dh-exec --no-act works" \
                        "^[^\|]*/dh-exec-subst | [^\|]*/dh-exec-install \[input: {0, random.install}, output: {0, NULL}\]\$"
tl_next

# Test that calling --list works
${top_builddir}/src/dh-exec --list | \
        tl_expect_match "dh-exec --list works" \
                        "	illiterate-tangle"
tl_next
