2001-08-07 23:29:04 +00:00
|
|
|
;; test-create-account.scm
|
|
|
|
;; load the engine and create an account
|
2015-09-29 12:08:48 -07:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; 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
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2001-08-07 23:29:04 +00:00
|
|
|
|
2019-10-05 20:06:58 +02:00
|
|
|
(use-modules (gnucash engine))
|
2001-08-07 23:29:04 +00:00
|
|
|
|
|
|
|
(define (run-test)
|
2011-12-02 22:00:18 +00:00
|
|
|
(setenv "GNC_UNINSTALLED" "1")
|
2001-10-04 00:36:28 +00:00
|
|
|
|
2018-06-17 16:43:33 -07:00
|
|
|
(let* ((book (qof-book-new))
|
2007-02-23 01:23:31 +00:00
|
|
|
(root (xaccMallocAccount book))
|
2006-10-15 19:02:05 +00:00
|
|
|
(acct (xaccMallocAccount book)))
|
|
|
|
(xaccAccountBeginEdit acct)
|
|
|
|
(xaccAccountSetName acct "foo")
|
|
|
|
(xaccAccountCommitEdit acct)
|
2007-02-23 01:23:31 +00:00
|
|
|
(gnc-account-append-child root acct))
|
2001-08-07 23:29:04 +00:00
|
|
|
#t)
|
2011-12-02 22:00:18 +00:00
|
|
|
|