| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
{ |
| 4 |
fake_control_header 'dpkg-dev, gcc, red-herring1, red-herring2, red-herring3' |
| 5 |
|
| 6 |
fake_control_package basic all '${a:Built-Using}' |
| 7 |
fake_control_package and-direct all '${a:Built-Using}, ${dh-builtusing:gcc}' |
| 8 |
fake_control_package commented all '${a:Built-Using}, ${b:Built-Using}' |
| 9 |
fake_control_package empty-lines all '${a:Built-Using}, ${b:Built-Using}' |
| 10 |
fake_control_package optional all '${a:Built-Using}' |
| 11 |
fake_control_package trailing-spaces all '${a:Built-Using}' |
| 12 |
|
| 13 |
} > debian/control |
| 14 |
|
| 15 |
echo 'a:Built-Using=a, ${dh-builtusing:dpkg-dev} , b |
| 16 |
' > debian/basic.substvars |
| 17 |
|
| 18 |
echo 'a:Built-Using=${dh-builtusing:dpkg-dev} |
| 19 |
' > debian/and-direct.substvars |
| 20 |
|
| 21 |
echo '# initial comment ${dh-builtusing:red-herring1} |
| 22 |
a:Built-Using=${dh-builtusing:dpkg-dev} |
| 23 |
# commented-equal-sign=${dh-builtusing:red-herring2} |
| 24 |
b:Built-Using?=${dh-builtusing:gcc} |
| 25 |
# final comment ${dh-builtusing:red-herring3} |
| 26 |
' > debian/commented.substvars |
| 27 |
|
| 28 |
echo ' |
| 29 |
|
| 30 |
a:Built-Using=${dh-builtusing:dpkg-dev} |
| 31 |
|
| 32 |
b:Built-Using?=${dh-builtusing:gcc} |
| 33 |
|
| 34 |
' > debian/empty-lines.substvars |
| 35 |
|
| 36 |
echo 'a:Built-Using?=a, ${dh-builtusing:dpkg-dev} , b |
| 37 |
' > debian/optional.substvars |
| 38 |
|
| 39 |
echo 'a:Built-Using=${dh-builtusing:dpkg-dev} |
| 40 |
' > debian/trailing-spaces.substvars |
| 41 |
|
| 42 |
# A deprecation warning is expected on stderr, hide it to autopkgtest. |
| 43 |
$tested_command 2>&1 |
| 44 |
|
| 45 |
check_substvar basic dpkg-dev dpkg |
| 46 |
|
| 47 |
check_substvar and-direct dpkg-dev dpkg |
| 48 |
check_substvar and-direct gcc gcc-defaults |
| 49 |
|
| 50 |
check_substvar commented dpkg-dev dpkg |
| 51 |
check_substvar commented gcc gcc-defaults |
| 52 |
check_substvars_absent commented red-herring1 red-herring2 red-herring3 |
| 53 |
|
| 54 |
check_substvar empty-lines dpkg-dev dpkg |
| 55 |
check_substvar empty-lines gcc gcc-defaults |
| 56 |
|
| 57 |
check_substvar optional dpkg-dev dpkg |
| 58 |
|
| 59 |
check_substvar trailing-spaces dpkg-dev dpkg |
| 60 |
|
| 61 |
dh_gencontrol |
| 62 |
|
| 63 |
check_control basic dpkg |
| 64 |
check_control and-direct dpkg |
| 65 |
check_control and-direct gcc-defaults |
| 66 |
check_control commented dpkg |
| 67 |
check_control commented gcc-defaults |
| 68 |
check_control empty-lines dpkg |
| 69 |
check_control empty-lines gcc-defaults |
| 70 |
check_control optional dpkg |
| 71 |
check_control trailing-spaces dpkg |