diff --git a/.travis.yml b/.travis.yml index 9dd4d8c..6697465 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,31 @@ language: c -addons: - apt: - packages: - - libcurl4-openssl-dev - - libjson0-dev +sudo: required + +env: + - CFG_DEBUG=--enable-debug + - CFG_DEBUG=--disable-debug + - CFG_GEO=--disable-geonames + - CFG_GEO=--enable-geonames + +os: + - linux + - os + +compiler: + - clang + - gcc before_install: + - sudo apt-get -qq update + - sudo apt-get install -y libnova-dev libcurl4-openssl-dev libjson-c-dev + +install: - autoreconf -i + +script: + - ./configure + - make + +test: + - make test diff --git a/Makefile.am b/Makefile.am index 06ea1f9..8c6d67b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,3 +3,12 @@ SUBDIRS = src dist_doc_DATA = README man_MANS = doc/calcelestial.1 + +TEST_OPTS = -p sun -m rise -t 1990-03-20 -q Baden,Switzerland + +test: src/calcelestial + [ "$$(src/calcelestial ${TEST_OPTS} -l -f %H:%M:%S)" == "06:30:53" ] + [ "$$(src/calcelestial ${TEST_OPTS} -l -f §A:§O)" == "47.473:8.306" ] + [ "$$(src/calcelestial ${TEST_OPTS} -l -f %J)" == "2447970.730" ] + [ "$$(src/calcelestial ${TEST_OPTS} -l -f %Z)" == "CET" ] + [ "$$(src/calcelestial ${TEST_OPTS} -z America/New_York -f %H:%M:%S)" == "00:30:53" ] \ No newline at end of file diff --git a/configure.ac b/configure.ac index f3a991f..913fefe 100644 --- a/configure.ac +++ b/configure.ac @@ -53,9 +53,9 @@ AC_ARG_ENABLE( if test x"$debug" = x"yes"; then AC_DEFINE([DEBUG], [], [enable debugging]) - AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -Werror -Wno-uninitialized -O0 -fno-omit-frame-pointer" + AM_CFLAGS="$AM_CFLAGS -g -Wall -Werror -Wno-uninitialized -O0 -fno-omit-frame-pointer" else - AM_CXXFLAGS="$AM_CXXFLAGS -O3" + AM_CFLAGS="$AM_CFLAGS -O3" fi AC_OUTPUT diff --git a/doc/calcelestial.1 b/doc/calcelestial.1 index 3a4776a..99d1aba 100644 --- a/doc/calcelestial.1 +++ b/doc/calcelestial.1 @@ -64,6 +64,9 @@ override system timezone .B -u, --universal use universial time for parsing and formatting .TP +.B -l, --local +use the the timezone at --query or --lat / --lon +.TP .B -h, --help show this help .TP @@ -96,9 +99,6 @@ diameter in arcseconds .B §e distance in kilometer .TP -.B §t -observer timezone in hours west -.TP .B §A observer latitude in degrees north .TP