Add a test for unexpected warnings
This commit is contained in:
parent
0cc83cd5ec
commit
a8212a397e
4 changed files with 9 additions and 1 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -12,6 +12,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install test dependencies
|
||||
run: sudo apt-get install libtest-warnings-perl
|
||||
- name: autogen
|
||||
run: ./autogen
|
||||
- name: configure
|
||||
|
@ -24,6 +26,8 @@ jobs:
|
|||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install test dependencies
|
||||
run: sudo apt-get install libtest-warnings-perl
|
||||
- name: autogen
|
||||
run: ./autogen
|
||||
- name: configure
|
||||
|
|
|
@ -63,6 +63,7 @@ To add a new test script:
|
|||
use Test::More;
|
||||
# Your test dependencies go here.
|
||||
|
||||
SKIP: { eval { require Test::Warnings; } or skip($@, 1); }
|
||||
eval { require 'ddclient'; } or BAIL_OUT($@);
|
||||
|
||||
# Your tests go here.
|
||||
|
|
|
@ -27,8 +27,10 @@ m4_foreach_w([_m], [
|
|||
], [AX_PROG_PERL_MODULES([_m], [],
|
||||
[AC_MSG_ERROR([missing required Perl module _m])])])
|
||||
|
||||
# Perl modules required for tests. Only prints a warning.
|
||||
# Perl modules required for tests. Only prints a warning if not
|
||||
# installed.
|
||||
m4_foreach_w([_m], [
|
||||
Test::Warnings
|
||||
], [AX_PROG_PERL_MODULES([_m], [],
|
||||
[AC_MSG_WARN([some tests may be skipped due to missing module _m])])])
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use Test::More;
|
||||
use version;
|
||||
|
||||
SKIP: { eval { require Test::Warnings; } or skip($@, 1); }
|
||||
eval { require 'ddclient'; } or BAIL_OUT($@);
|
||||
|
||||
is(ddclient->VERSION(), version->parse('v@PACKAGE_VERSION@'), "version matches Autoconf config");
|
||||
|
|
Loading…
Reference in a new issue