[sanexx-commit] SF.net SVN: sanexx: [5]
Status: Pre-Alpha
Brought to you by:
paddy_hack
|
From: <pad...@us...> - 2006-02-25 14:55:14
|
Revision: 5 Author: paddy_hack Date: 2006-02-25 06:55:01 -0800 (Sat, 25 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=5&view=rev Log Message: ----------- r10@qed: olaf | 2006-02-25 23:49:36 +0900 Integrated the "use-case" tests in the build infra-structure and added a first simple test. Modified Paths: -------------- trunk/Makefile.am trunk/configure.ac Added Paths: ----------- trunk/tests/Makefile.am trunk/tests/frontend-cli-options trunk/tests/functions Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:9 + 52428bda-890d-0410-88ad-be188b7e1831:/local:10 Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2006-02-25 14:54:49 UTC (rev 4) +++ trunk/Makefile.am 2006-02-25 14:55:01 UTC (rev 5) @@ -24,7 +24,8 @@ SUBDIRS = \ lib \ - src + src \ + tests include_HEADERS = \ include/sane++ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-02-25 14:54:49 UTC (rev 4) +++ trunk/configure.ac 2006-02-25 14:55:01 UTC (rev 5) @@ -70,6 +70,7 @@ Makefile \ lib/Makefile \ src/Makefile \ + tests/Makefile \ ]) AC_OUTPUT Added: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am (rev 0) +++ trunk/tests/Makefile.am 2006-02-25 14:55:01 UTC (rev 5) @@ -0,0 +1,32 @@ +## Makefile.am -- an automake template for a Makefile.in file +## Copyright (C) 2006 Olaf Meeuwissen +## +## This file is part of the 'sane++' package. +## This package is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License or, at +## your option, any later version. +## +## This package is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +## FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +## See the GNU General Public License for more details. +## +## You should have received a verbatim copy of the GNU General Public +## License along with this package; if not, write to: +## +## Free Software Foundation +## 51 Franklin Street, 5th Floor +## Boston, MA 02110-1301 USA +## +## Process this file with automake to produce a Makefile.in file. + + +TESTS = \ + frontend-cli-options + +$(TESTS): functions + +EXTRA_DIST = \ + functions \ + $(TESTS) Added: trunk/tests/frontend-cli-options =================================================================== --- trunk/tests/frontend-cli-options (rev 0) +++ trunk/tests/frontend-cli-options 2006-02-25 14:55:01 UTC (rev 5) @@ -0,0 +1,43 @@ +#! /bin/sh +# frontend-cli-options -- checks for presence of command-line options +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +source ${srcdir}/functions + +PATH=../src:$PATH + +test_documented_options () +{ + program=$1 + shift + + for opt in \ + help \ + version \ + $@ \ + ; do + $program --help 2>/dev/null \ + | grep -we --$opt 2>&1 >/dev/null + done +} + +test_documented_options scanimage++ Property changes on: trunk/tests/frontend-cli-options ___________________________________________________________________ Name: svn:executable + * Added: trunk/tests/functions =================================================================== --- trunk/tests/functions (rev 0) +++ trunk/tests/functions 2006-02-25 14:55:01 UTC (rev 5) @@ -0,0 +1,30 @@ +# functions -- to ease writing tests -*- sh -*- +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +debug_mode () +{ + test x$SANEXX_TEST_DEBUG != x +} + +debug_mode && set -x # trace command invocation + +set -e # bomb at the first error This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |