head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	2000.04.13.08.32.33;	author phil;	state Exp;
branches;
next	1.4;

1.4
date	99.11.15.00.56.52;	author phil;	state Exp;
branches;
next	1.3;

1.3
date	99.11.15.00.48.35;	author phil;	state Exp;
branches;
next	1.2;

1.2
date	98.09.16.23.56.17;	author phil;	state Exp;
branches;
next	1.1;

1.1
date	98.09.16.23.39.39;	author phil;	state Exp;
branches;
next	;


desc
@@


1.5
log
@fix typo
@
text
@#!/bin/sh

# $Id: grep,v 1.4 1999/11/15 00:56:52 phil Exp phil $
# Copyright (c) 1998  Philip Hands <phil@@hands.com>
# This program is distributed under the terms of the GPL.

# Example test script, for use with the debian-test package, for
# testing that grep is vaguely functional.

# check that grep is installed
test -e /bin/grep || exit 0
##
# we need to do this pre-run check for default-tests, but a package's
# own tests don't need to bother, because they are only present if the
# package is actually installed

. ${DEBIANTEST_LIB:-/usr/lib/debian-test/lib}/functions.sh

test_simple() {
  test "feeble" = `echo -e "this\nis\na\nfeeble\ntest" | grep 'fee'`
}

test_bo() {
  test "10:feeble" = `echo -e "this\nis\na\nfeeble\ntest" | grep -b 'fee'`
}

runtest "Simple substring"                     test_simple
runtest "Simple substring, with byte offset"   test_bo 
@


1.4
log
@*** empty log message ***
@
text
@d3 1
a3 1
# $Id: grep,v 1.3 1999/11/15 00:48:35 phil Exp phil $
d8 1
a8 1
# testing that grep is vaugly functional.
@


1.3
log
@add default path for functions.sh
@
text
@d3 1
a3 1
# $Id: grep,v 1.2 1998/09/16 23:56:17 phil Exp phil $
d12 4
@


1.2
log
@*** empty log message ***
@
text
@d3 1
a3 1
# $Id: grep,v 1.1 1998/09/16 23:39:39 phil Exp phil $
d13 1
a13 1
. ${DEBIANTEST_LIB}/functions.sh
@


1.1
log
@Initial revision
@
text
@d3 3
a5 3
# $Id:$
# Copyright 1998 (c) Philip Hands <phil@@hands.com>
# Distributed under the terms of the GPL.
@
