diff options
author | xentac | 2017-03-17 23:13:58 -0700 |
---|---|---|
committer | GitHub | 2017-03-17 23:13:58 -0700 |
commit | 4c19b4957ab7931fc2467b225b7a61b1215c6581 (patch) | |
tree | ed86a0ff517c69c44586e251b46c17ba9e4a3406 | |
parent | 548424b59ac5902a07d53a2c984baeb3983c28ca (diff) | |
parent | 83ee9691e8e0e847af357d29b797c2773ed63b23 (diff) | |
download | vim-beancount-4c19b4957ab7931fc2467b225b7a61b1215c6581.tar.gz |
Merge pull request #40 from yagebu/test
Tests; setup travis
Diffstat (limited to '')
-rw-r--r-- | .travis.yml | 15 | ||||
-rw-r--r-- | test/align.vader | 39 |
2 files changed, 54 insertions, 0 deletions
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 diff --git a/test/align.vader b/test/align.vader new file mode 100644 index 0000000..76496fc --- /dev/null +++ b/test/align.vader @@ -0,0 +1,39 @@ +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 + +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 + +Execute (change alignment column and align again): + let g:beancount_separator_col=40 + %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 |