mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[Bug 666329] Empty database after a little while
Create failing test for gnc_sql_commit_edit() showing that it doesn't call book->dirty_cb when the instance gnc_sql_commit_edit() is called on the book itself. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21824 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e0e4994ed1
commit
e8a9591eec
@ -1,4 +1,6 @@
|
||||
include $(top_srcdir)/test-templates/Makefile.decl
|
||||
SUBDIRS = . test
|
||||
TEST_SUBDIRS = test
|
||||
|
||||
# Now a shared library AND a GModule
|
||||
lib_LTLIBRARIES = libgnc-backend-sql.la
|
||||
|
@ -1,5 +1,8 @@
|
||||
SUBDIRS = .
|
||||
|
||||
include $(top_srcdir)/test-templates/Makefile.decl
|
||||
MODULEPATH = src/backend/sql
|
||||
|
||||
test_column_types_SOURCES = \
|
||||
test-column-types.c
|
||||
|
||||
@ -20,8 +23,7 @@ TESTS_ENVIRONMENT = \
|
||||
SRCDIR=${srcdir} \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
||||
check_PROGRAMS = \
|
||||
test-column-types
|
||||
check_PROGRAMS = $(TESTS)
|
||||
|
||||
#noinst_HEADERS = test-file-stuff.h
|
||||
|
||||
@ -49,3 +51,29 @@ AM_CFLAGS = \
|
||||
${GCONF_CFLAGS}
|
||||
|
||||
INCLUDES = -DG_LOG_DOMAIN=\"gnc.backend.sql\"
|
||||
|
||||
TEST_PROGS += test-sqlbe
|
||||
test_sqlbedir = ${top_srcdir}/${MODULEPATH}/test
|
||||
|
||||
noinst_PROGRAMS = $(TESTS) $(TEST_PROGS)
|
||||
|
||||
test_sqlbe_SOURCES = \
|
||||
test-sqlbe.c \
|
||||
utest-gnc-backend-sql.c
|
||||
|
||||
test_sqlbe_HEADERS = \
|
||||
$(top_srcdir)/$(MODULEPATH)/gnc-backend-sql.h
|
||||
|
||||
test_sqlbe_LDADD = \
|
||||
$(top_builddir)/$(MODULEPATH)/libgnc-backend-sql.la \
|
||||
$(top_builddir)/src/libqof/qof/libgnc-qof.la \
|
||||
$(top_builddir)/src/test-core/libtest-core.la
|
||||
|
||||
test_sqlbe_CFLAGS = \
|
||||
-DTESTPROG=test_sqlbe \
|
||||
$(DEFAULT_INCLUDES) \
|
||||
-I$(top_srcdir)/$(MODULEPATH)/ \
|
||||
-I$(top_srcdir)/src/backend/dbi/ \
|
||||
-I$(top_srcdir)/src/libqof/qof/ \
|
||||
-I$(top_srcdir)/src/test-core/ \
|
||||
$(GLIB_CFLAGS)
|
42
src/backend/sql/test/test-sqlbe.c
Normal file
42
src/backend/sql/test/test-sqlbe.c
Normal file
@ -0,0 +1,42 @@
|
||||
/********************************************************************
|
||||
* testmain.c: GLib g_test test execution file. *
|
||||
* Copyright 2011 John Ralls <jralls@ceridwen.us> *
|
||||
* *
|
||||
* This program 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 program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
\********************************************************************/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include "qof.h"
|
||||
|
||||
extern void test_suite_gnc_backend_sql ();
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
g_type_init(); /* Initialize the GObject system */
|
||||
g_test_init ( &argc, &argv, NULL ); /* initialize test program */
|
||||
qof_log_init_filename_special("stderr"); /* Init the log system */
|
||||
g_test_bug_base("https://bugzilla.gnome.org/show_bug.cgi?id="); /* init the bugzilla URL */
|
||||
|
||||
test_suite_gnc_backend_sql ();
|
||||
|
||||
return g_test_run( );
|
||||
}
|
1003
src/backend/sql/test/utest-gnc-backend-sql.c
Normal file
1003
src/backend/sql/test/utest-gnc-backend-sql.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,8 @@ TEST_PROGS += test-foo
|
||||
|
||||
noinst_PROGRAMS = ${TEST_PROGS}
|
||||
|
||||
test_foodir = ${top_srcdir}/${MODULEPATH}/test
|
||||
|
||||
#Program files for tests go here. It's probably best to have one for
|
||||
#each file in the parent directory. Include
|
||||
#test_foo_support.c if you have one and aren't building the
|
||||
@ -44,6 +46,7 @@ test_foo_HEADERSS = \
|
||||
test_foo_LDADD = ${top_buildir}/${MODULEPATH}/libgnc_foo.la
|
||||
|
||||
test_foo_CFLAGS = \
|
||||
-DTESTPROG=test_foo \
|
||||
${DEFAULT_INCLUDES} \
|
||||
-I$(top_srcdir)/${MODULEPATH}/ \
|
||||
${GLIB_CFLAGS}
|
||||
|
Loading…
Reference in New Issue
Block a user