From a43671384bb840518f99041160ec680c0009f40f Mon Sep 17 00:00:00 2001 From: Jakob Schnitzer Date: Tue, 14 Mar 2017 19:45:57 -0300 Subject: add vader.vim test for AlignCommodity --- test/align.vader | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/align.vader diff --git a/test/align.vader b/test/align.vader new file mode 100644 index 0000000..1bdc5f0 --- /dev/null +++ b/test/align.vader @@ -0,0 +1,27 @@ +Given beancount: + metadata: 50 + Assets:Cash 50 + Assets:Cash 50.00 + Assets:Cash 50.00 + Assets:Cash 50.00 USD + +Execute (align): + %AlignCommodity + +Expect beancount: + metadata: 50 + Assets:Cash 50 + Assets:Cash 50.00 + Assets:Cash 50.00 + Assets:Cash 50.00 USD + +Execute (change alignment column and align again): + let g:beancount_separator_col=40 + %AlignCommodity + +Expect beancount: + metadata: 50 + Assets:Cash 50 + Assets:Cash 50.00 + Assets:Cash 50.00 + Assets:Cash 50.00 USD -- cgit v1.2.3-2-gb3c3 From 4f8d20a857be6dbc201a416b7bc8708096f79384 Mon Sep 17 00:00:00 2001 From: Jakob Schnitzer Date: Tue, 14 Mar 2017 20:12:51 -0300 Subject: add travis config --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..099d4d5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +matrix: + include: + - env: TEST_ENV=lint + language: python + before_script: pip install vim-vint + script: vint -s . + - env: TEST_ENV=test + language: viml + before_script: git clone https://github.com/junegunn/vader.vim.git + script: | + vim -Nu <(cat << VIMRC + set rtp+=vader.vim + set rtp+=. + filetype plugin indent on + VIMRC) -c 'Vader! test/*' > /dev/null -- cgit v1.2.3-2-gb3c3 From 83ee9691e8e0e847af357d29b797c2773ed63b23 Mon Sep 17 00:00:00 2001 From: Jakob Schnitzer Date: Tue, 14 Mar 2017 21:19:04 -0300 Subject: more align tests --- test/align.vader | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/align.vader b/test/align.vader index 1bdc5f0..76496fc 100644 --- a/test/align.vader +++ b/test/align.vader @@ -1,7 +1,11 @@ Given beancount: + 2012-12-12 balance Assets:LongLongLongAccount 50.00 + 2012-12-12 balance Assets:Cash 50.00 + 2012-12-12 price EUR 50.00 USD metadata: 50 Assets:Cash 50 Assets:Cash 50.00 + ! Assets:Cash 50.00 Assets:Cash 50.00 Assets:Cash 50.00 USD @@ -9,9 +13,13 @@ Execute (align): %AlignCommodity Expect beancount: + 2012-12-12 balance Assets:LongLongLongAccount 50.00 + 2012-12-12 balance Assets:Cash 50.00 + 2012-12-12 price EUR 50.00 USD metadata: 50 Assets:Cash 50 Assets:Cash 50.00 + ! Assets:Cash 50.00 Assets:Cash 50.00 Assets:Cash 50.00 USD @@ -20,8 +28,12 @@ Execute (change alignment column and align again): %AlignCommodity Expect beancount: + 2012-12-12 balance Assets:LongLongLongAccount 50.00 + 2012-12-12 balance Assets:Cash 50.00 + 2012-12-12 price EUR 50.00 USD metadata: 50 Assets:Cash 50 Assets:Cash 50.00 + ! Assets:Cash 50.00 Assets:Cash 50.00 Assets:Cash 50.00 USD -- cgit v1.2.3-2-gb3c3