diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2008-06-22 04:29:54 +0200 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2008-07-15 12:28:51 +0200 |
commit | d42d584c8102b2c82aaa5eab343b0b577b4f2bbe (patch) | |
tree | 8beff39b6b667eecbacfc207b09349beda59d2f8 /test | |
parent | bff7ed9c1ca23b055193a4b36b75ba4af92dd026 (diff) | |
download | nbb-d42d584c8102b2c82aaa5eab343b0b577b4f2bbe.tar.gz nbb-d42d584c8102b2c82aaa5eab343b0b577b4f2bbe.tar.xz nbb-d42d584c8102b2c82aaa5eab343b0b577b4f2bbe.zip |
Implement 'nbb config <option> [<new-value>]'
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 1 | ||||
-rw-r--r-- | test/nbb-commands.at | 44 | ||||
-rw-r--r-- | test/nbb-config.at | 74 |
3 files changed, 75 insertions, 44 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index ee1666c..8a192b2 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -6,6 +6,7 @@ DISTCLEANFILES = TESTCASES = TESTCASES += autotest.at TESTCASES += nbb-basic.at +TESTCASES += nbb-config.at # Add more testcases here EXTRA_DIST += $(TESTCASES) diff --git a/test/nbb-commands.at b/test/nbb-commands.at deleted file mode 100644 index 4f045ab..0000000 --- a/test/nbb-commands.at +++ /dev/null @@ -1,44 +0,0 @@ -dnl =================================================================== - -AT_COPYRIGHT([Copyright (C) 2008 Hans Ulrich Niedermann]) -AT_TESTED([nbb]) - -dnl =================================================================== - -AT_SETUP([nbb: git config default defaults]) -AT_KEYWORDS([nbb git config]) -AT_CHECK([mkdir test.git && cd test.git]) -AT_CHECK([cd test.git && git init], [0], -[Initialized empty Git repository in .git/ -]) -echo "$PWD/test.git" > expout -AT_CHECK([cd test.git && nbb config srcdir], [0], [expout]) -echo "$PWD/test.git/_build/_master" > expout -AT_CHECK([cd test.git && nbb config builddir], [0], [expout]) -echo "$PWD/test.git/_install/master" > expout -AT_CHECK([cd test.git && nbb config installdir], [0], [expout]) -AT_CHECK([rm -rf test.git]) -AT_CLEANUP() - -dnl =================================================================== - -AT_SETUP([nbb: bzr config defaults]) -AT_KEYWORDS([nbb bzr config]) -AT_CHECK([mkdir test.bzr && cd test.bzr]) -AT_CHECK([cd test.bzr && bzr init]) -echo "$PWD/test.bzr" > expout -AT_CHECK([cd test.bzr && nbb config srcdir], [0], [expout]) -echo "$PWD/test.bzr/_build" > expout -AT_CHECK([cd test.bzr && nbb config builddir], [0], [expout]) -echo "$PWD/test.bzr/_install" > expout -AT_CHECK([cd test.bzr && nbb config installdir], [0], [expout]) -AT_CHECK([rm -rf test.git]) -AT_CLEANUP() - -dnl =================================================================== - -dnl =================================================================== - -dnl =================================================================== - - diff --git a/test/nbb-config.at b/test/nbb-config.at new file mode 100644 index 0000000..5b09199 --- /dev/null +++ b/test/nbb-config.at @@ -0,0 +1,74 @@ +dnl =================================================================== + +AT_COPYRIGHT([Copyright (C) 2008 Hans Ulrich Niedermann]) +AT_TESTED([nbb]) + +dnl =================================================================== + +AT_SETUP([nbb: git config defaults]) +AT_KEYWORDS([nbb git config]) +AT_CHECK([mkdir test.git && cd test.git]) +AT_CHECK([cd test.git && git init], [0], +[Initialized empty Git repository in .git/ +]) +AT_DATA([test.git/configure.ac], [dnl +AC[_]INIT(nbb-test, 1.2.3, invalid@invalid.invalid) +AC[_]OUTPUT +]) +AT_CHECK([echo "$PWD/test.git" > expout +cd test.git && nbb config srcdir], [0], [expout]) +AT_CHECK([echo "$PWD/test.git/_build/master" > expout +cd test.git && nbb config builddir], [0], [expout]) +AT_CHECK([echo "$PWD/test.git/_install/master" > expout +cd test.git && nbb config installdir], [0], [expout]) +AT_CHECK([rm -rf test.git]) +AT_CLEANUP() + +dnl =================================================================== + +AT_SETUP([nbb: git config set/get]) +AT_KEYWORDS([nbb git config]) +AT_CHECK([mkdir test.git && cd test.git]) +AT_CHECK([cd test.git && git init], [0], +[Initialized empty Git repository in .git/ +]) +AT_DATA([test.git/configure.ac], [dnl +AC[_]INIT(nbb-test, 1.2.3, invalid@invalid.invalid) +AC[_]OUTPUT +]) +AT_CHECK([echo "$PWD/test.git" > expout +cd test.git && nbb config srcdir], [0], [expout]) +AT_CHECK([echo "$PWD/test.git/_build/master" > expout +cd test.git && nbb config builddir], [0], [expout]) +AT_CHECK([cd test.git && nbb config builddir _foo]) +AT_CHECK([echo "$PWD/test.git/_foo/master" > expout +cd test.git && nbb config builddir], [0], [expout]) +AT_CHECK([cd test.git && nbb config builddir _bar]) +AT_CHECK([echo "$PWD/test.git/_bar/master" > expout +cd test.git && nbb config builddir], [0], [expout]) +dnl TBD: --unset or something similar to reset to defaults +AT_CHECK([rm -rf test.git]) +AT_CLEANUP() + +dnl =================================================================== + +dnl AT_SETUP([nbb: bzr config defaults]) +dnl AT_KEYWORDS([nbb bzr config]) +dnl AT_CHECK([mkdir test.bzr && cd test.bzr]) +dnl AT_CHECK([cd test.bzr && bzr init]) +dnl echo "$PWD/test.bzr" > expout +dnl AT_CHECK([cd test.bzr && nbb config srcdir], [0], [expout]) +dnl echo "$PWD/test.bzr/_build" > expout +dnl AT_CHECK([cd test.bzr && nbb config builddir], [0], [expout]) +dnl echo "$PWD/test.bzr/_install" > expout +dnl AT_CHECK([cd test.bzr && nbb config installdir], [0], [expout]) +dnl AT_CHECK([rm -rf test.git]) +dnl AT_CLEANUP() + +dnl =================================================================== + +dnl =================================================================== + +dnl =================================================================== + + |