File: 0001

package info (click to toggle)
licenseutils 0.0.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,544 kB
  • sloc: ansic: 26,826; sh: 6,905; makefile: 710; cpp: 348; sed: 16
file content (39 lines) | stat: -rwxr-xr-x 1,009 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# Copyright (C) 2013 Ben Asselstine
# 
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.
echo=`which echo`

# in Debian we don't like build processes to try to access non-localhost networks
# skip this test
exit 77

# if there is no network available during the build, skip the test
ping -q -c 1 debian.org 2>&1 /dev/null
if [ ! $? -eq 0 ] ; then
        echo what
    exit 77
fi

#here is what we expect
expected=`mktemp $builddir/licensing.XXXXXX`
$echo -n "c" > $expected

#generating our results
$licensing choose c --quiet
cat ${HOME}/.licenseutils/selected-comment-style

#0001.log is simultaneously created as this script runs.
diff -uNrd $expected $builddir/0001.log
retval=$?

#cleanup
rm $expected
rm ${HOME}/.licenseutils/selected-comment-style
$licensing forget
rmdir ${HOME}/.licenseutils

exit $retval