#!/bin/sh

{
    fake_control_header ''

    fake_control_package no      all '${dh-builtusing:gcc}'
    fake_control_package foreign all '${dh-builtusing:dpkg-dev}'
    fake_control_package same    all '${dh-builtusing:libc6}'
    fake_control_package allowed all '${dh-builtusing:make}'

} > debian/control

$tested_command

check_substvar no      gcc      gcc-defaults
check_substvar foreign dpkg-dev dpkg
check_substvar same    libc6    glibc
check_substvar allowed make     make-dfsg

dh_gencontrol

check_control no      gcc-defaults
check_control foreign dpkg
check_control same    glibc
check_control allowed make-dfsg
