adds test file skeleton to build system

Thu, 23 Aug 2018 17:58:38 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 23 Aug 2018 17:58:38 +0200
changeset 56
ed65f8c73fb2
parent 55
b19e73926a28
child 57
68018eac46c3

adds test file skeleton to build system

.hgignore file | annotate | diff | comparison | revisions
Makefile.am file | annotate | diff | comparison | revisions
configure.ac file | annotate | diff | comparison | revisions
prebuild.sh file | annotate | diff | comparison | revisions
test/Makefile.am file | annotate | diff | comparison | revisions
test/codeonly.sh file | annotate | diff | comparison | revisions
test/nocomments.sh file | annotate | diff | comparison | revisions
test/total.sh file | annotate | diff | comparison | revisions
     1.1 --- a/.hgignore	Thu Aug 23 17:15:30 2018 +0200
     1.2 +++ b/.hgignore	Thu Aug 23 17:58:38 2018 +0200
     1.3 @@ -12,6 +12,7 @@
     1.4  ^depcomp$
     1.5  ^install-sh$
     1.6  ^missing$
     1.7 +^test-driver$
     1.8  ^configure$
     1.9  ^config\.
    1.10  \.in$
    1.11 @@ -23,7 +24,6 @@
    1.12  /\.deps/
    1.13  /\.libs/
    1.14  ^stamp-h
    1.15 -^test/clinetest
    1.16  /test-suite.log$
    1.17  ^cline-.*\.tar.gz$
    1.18  
     2.1 --- a/Makefile.am	Thu Aug 23 17:15:30 2018 +0200
     2.2 +++ b/Makefile.am	Thu Aug 23 17:58:38 2018 +0200
     2.3 @@ -22,4 +22,4 @@
     2.4  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     2.5  
     2.6  AUTOMAKE_OPTIONS = foreign
     2.7 -SUBDIRS = src
     2.8 +SUBDIRS = src test
     3.1 --- a/configure.ac	Thu Aug 23 17:15:30 2018 +0200
     3.2 +++ b/configure.ac	Thu Aug 23 17:58:38 2018 +0200
     3.3 @@ -23,8 +23,6 @@
     3.4  
     3.5  AC_PREREQ([2.69])
     3.6  AC_INIT(cline, 1.1, universe@uap-core.de)
     3.7 -AC_CONFIG_SRCDIR([src/cline.c])
     3.8 -AC_CONFIG_HEADERS([config.h])
     3.9  AM_INIT_AUTOMAKE
    3.10  
    3.11  # Conditionals
    3.12 @@ -57,4 +55,9 @@
    3.13  AC_FUNC_REALLOC
    3.14  AC_CHECK_FUNCS([memset regcomp strcasecmp strchr])
    3.15  
    3.16 -AC_OUTPUT(Makefile src/Makefile)
    3.17 +# What shall be generated
    3.18 +AC_CONFIG_HEADERS([config.h])
    3.19 +AC_CONFIG_FILES([Makefile src/Makefile test/Makefile])
    3.20 +
    3.21 +# Just do it!
    3.22 +AC_OUTPUT
    3.23 \ No newline at end of file
     4.1 --- a/prebuild.sh	Thu Aug 23 17:15:30 2018 +0200
     4.2 +++ b/prebuild.sh	Thu Aug 23 17:58:38 2018 +0200
     4.3 @@ -24,5 +24,5 @@
     4.4  autoreconf -i
     4.5  mkdir -p build
     4.6  cd build
     4.7 -../configure $*
     4.8 +../configure "$@"
     4.9  
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/test/Makefile.am	Thu Aug 23 17:58:38 2018 +0200
     5.3 @@ -0,0 +1,25 @@
     5.4 +# Copyright 2018 Mike Becker. All rights reserved.
     5.5 +# 
     5.6 +# Redistribution and use in source and binary forms, with or without
     5.7 +# modification, are permitted provided that the following conditions are met:
     5.8 +# 
     5.9 +# 1. Redistributions of source code must retain the above copyright
    5.10 +# notice, this list of conditions and the following disclaimer.
    5.11 +# 
    5.12 +# 2. Redistributions in binary form must reproduce the above copyright
    5.13 +# notice, this list of conditions and the following disclaimer in the
    5.14 +# documentation and/or other materials provided with the distribution.
    5.15 +# 
    5.16 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    5.17 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    5.18 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    5.19 +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    5.20 +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    5.21 +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    5.22 +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    5.23 +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    5.24 +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    5.25 +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    5.26 +
    5.27 +TESTS = $(check_SCRIPTS)
    5.28 +check_SCRIPTS = total.sh nocomments.sh codeonly.sh
    5.29 \ No newline at end of file
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/test/codeonly.sh	Thu Aug 23 17:58:38 2018 +0200
     6.3 @@ -0,0 +1,31 @@
     6.4 +#!/bin/sh
     6.5 +#
     6.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.7 +#
     6.8 +# Copyright 2018 Mike Becker. All rights reserved.
     6.9 +#
    6.10 +# Redistribution and use in source and binary forms, with or without
    6.11 +# modification, are permitted provided that the following conditions are met:
    6.12 +#
    6.13 +#   1. Redistributions of source code must retain the above copyright
    6.14 +#      notice, this list of conditions and the following disclaimer.
    6.15 +#
    6.16 +#   2. Redistributions in binary form must reproduce the above copyright
    6.17 +#      notice, this list of conditions and the following disclaimer in the
    6.18 +#      documentation and/or other materials provided with the distribution.
    6.19 +#
    6.20 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    6.21 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    6.22 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    6.23 +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    6.24 +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    6.25 +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    6.26 +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    6.27 +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    6.28 +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    6.29 +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    6.30 +# POSSIBILITY OF SUCH DAMAGE.
    6.31 +#
    6.32 +
    6.33 +echo "Verifying correctness of total line count."
    6.34 +
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/test/nocomments.sh	Thu Aug 23 17:58:38 2018 +0200
     7.3 @@ -0,0 +1,31 @@
     7.4 +#!/bin/sh
     7.5 +#
     7.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     7.7 +#
     7.8 +# Copyright 2018 Mike Becker. All rights reserved.
     7.9 +#
    7.10 +# Redistribution and use in source and binary forms, with or without
    7.11 +# modification, are permitted provided that the following conditions are met:
    7.12 +#
    7.13 +#   1. Redistributions of source code must retain the above copyright
    7.14 +#      notice, this list of conditions and the following disclaimer.
    7.15 +#
    7.16 +#   2. Redistributions in binary form must reproduce the above copyright
    7.17 +#      notice, this list of conditions and the following disclaimer in the
    7.18 +#      documentation and/or other materials provided with the distribution.
    7.19 +#
    7.20 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    7.21 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    7.22 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    7.23 +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    7.24 +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    7.25 +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    7.26 +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    7.27 +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    7.28 +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    7.29 +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    7.30 +# POSSIBILITY OF SUCH DAMAGE.
    7.31 +#
    7.32 +
    7.33 +echo "Verifying correctness of total line count."
    7.34 +
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/test/total.sh	Thu Aug 23 17:58:38 2018 +0200
     8.3 @@ -0,0 +1,31 @@
     8.4 +#!/bin/sh
     8.5 +#
     8.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     8.7 +#
     8.8 +# Copyright 2018 Mike Becker. All rights reserved.
     8.9 +#
    8.10 +# Redistribution and use in source and binary forms, with or without
    8.11 +# modification, are permitted provided that the following conditions are met:
    8.12 +#
    8.13 +#   1. Redistributions of source code must retain the above copyright
    8.14 +#      notice, this list of conditions and the following disclaimer.
    8.15 +#
    8.16 +#   2. Redistributions in binary form must reproduce the above copyright
    8.17 +#      notice, this list of conditions and the following disclaimer in the
    8.18 +#      documentation and/or other materials provided with the distribution.
    8.19 +#
    8.20 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    8.21 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    8.22 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    8.23 +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    8.24 +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    8.25 +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    8.26 +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    8.27 +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    8.28 +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    8.29 +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    8.30 +# POSSIBILITY OF SUCH DAMAGE.
    8.31 +#
    8.32 +
    8.33 +echo "Verifying correctness of total line count."
    8.34 +

mercurial