summaryrefslogtreecommitdiff
path: root/debian/tests/id
blob: 4a0a8a3b21b628f0c5e4299076740ad44cec29dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

real_id=$(id -u)
fake_id=$(fakeroot id -u)

case "${real_id}:${fake_id}" in
  (0:0)
  echo >&2 "test run under root: failure"
  exit 1
  ;;
  (*:0)
  echo "id: OK"
  ;;
  (*)
  echo >&2 "unexpected result (${real_id}:${fake_id}): failure"
  exit 2
  ;;
esac