[go: up one dir, main page]

File: host.t

package info (click to toggle)
fakechroot 2.19-3.3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,148 kB
  • sloc: ansic: 6,893; sh: 5,995; makefile: 349; perl: 169; java: 5
file content (20 lines) | stat: -rwxr-xr-x 453 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

srcdir=${srcdir:-.}
. $srcdir/common.inc.sh

plan 1

if ! command -v host >/dev/null 2>&1; then
    skip 1 "missing host command"
elif ! host 127.0.0.1 2>&1 | grep -qs 1.0.0.127.in-addr.arpa; then
    skip 1 "host 127.0.0.1 does not work"
else
    PATH=$srcdir/bin:$PATH
    export LIBC_FATAL_STDERR_=1
    t=`fakechroot host 127.0.0.1 2>&1`
    echo "$t" | grep -qs 1.0.0.127.in-addr.arpa || not
    ok "host 127.0.0.1 returns" "$t"
fi

end