Commit graph

38 commits

Author SHA1 Message Date
Aaron Lichtman
1fd1fcc00d Exit jrnl if no text entered into editor
Add test for aborting jrnl entry from editor
Use native mocking
Add comment explaining discrepancy between expected and asserted output
Fix check_empty_output method
Check message on stderr and patch subprocess.call
Add _mock_editor_function
Update features/steps/core.py
Add return from mock function
Add debug statements
Debug
Update features/steps/core.py
Move sys.exit() down
Fix test?
Fix test?
Fix test?
Clean up debug statements
Clean up debug statements
Remove extraneous code
Remove extra space
Add test for empty stdin input
Remove extra debug line
Fix test?
Fix test?
Update features/core.feature
Fix test?
Fix no stdin input test

Co-Authored-By: pspeter <peter.schmidb@gmail.com>
2020-04-10 11:51:55 -07:00
Peter Schmidbauer
7f46d1a40a Fix handling of little-endian date format
Ever since version 2.0, when parsing a journal file, jrnl would not use
the custom date format string anymore. Instead, it relied on the
dateutil library to get the parsing right. This change was made to allow
people to change their date format without having to manually change
their file. However, this broke some existing date formats like
%d.%m.%Y, as it would falsely interpret the month as day and vice versa.
This commit adds some tests to catch this error and fixes it by trying
to parse the dates using the custom format first, only falling back to
dateutil when needed.
2020-04-10 11:51:55 -07:00
Greg Bodnar
623fa6c307 Create encrypted journal
Add failing test for configuring an encrypted journal
Overload open for EncryptedJournal

This avoids the execution path that calls EncryptedJournal._create()
without a password parameter. It results in duplication of code that
requests and stores a password, which should be factored out in a
subsequent change.

Modify test to test for returned strings

The entered string for the password is not being used by the test and I
don't understand why.

Use util wrapper for getpass

This allows for tests to run without prompting for user input.
2020-04-10 11:51:55 -07:00
Jonathan Wren
b260ff35b9 #631 Escape data in square brackets 2020-04-10 11:51:55 -07:00
Micah Jerome Ellison
f37f82f782 [GH-614] resolving issues around unreadable dates and unparsed dates 2020-04-10 11:51:55 -07:00
Manuel Ebert
60a955de20 Template exporting FTW 2016-08-19 23:20:31 +00:00
Philip Douglass
ba05411a80 User defined indent character (#419)
Make indent character configurable.
2016-04-15 23:00:49 -07:00
flight16
28d87861cc Merged PR 2015-12-28 21:36:17 -08:00
Manuel Ebert
4adb5c252a Update tests for templates 2015-07-01 22:23:13 -07:00
Manuel Ebert
0d1b381bd1 Merge pull request #347 from MinchinWeb/2.0-rc1-markdown-export-fix
2.0 rc1 markdown export fix
2015-04-20 14:29:17 +02:00
Manuel Ebert
9bf4e52b2c Tests for #343 2015-04-20 14:25:20 +02:00
MinchinWeb
f1a83a51ed Add testing for increasing Headings on Markdown export 2015-04-14 15:13:00 -06:00
Manuel Ebert
539a88ed14 Tests for parsing issue fix 2015-04-05 18:38:37 +02:00
Manuel Ebert
6e52b5eb70 Tests for #333 2015-04-05 03:27:09 +04:00
Manuel Ebert
c508e0c574 Update all tests to new time format 2015-04-05 03:25:39 +04:00
Manuel Ebert
2615070df0 Hardcoded salt to fix crypto 2015-04-04 17:50:44 +11:00
Manuel Ebert
a1b5a4099e Work on cryptography 2014-09-27 13:15:46 -07:00
Manuel Ebert
e75e3d73a0 Converts tests to YAML 2014-09-12 15:28:12 -07:00
Manuel Ebert
60c03d96d6 Fixes config tests 2014-09-12 14:22:45 -07:00
U-NA\cle1413
e0fb621110 Add assertion to scenario that verifies a tag on a new line is recoginized as a tag. 2014-07-23 11:19:47 -04:00
Matt Hoffman
d5142a0a0a There should be a whitespace character in front of a tag. Fixes issue #237. 2014-07-22 22:14:26 -04:00
Manuel Ebert
88d4c52568 Tests for tagging 2014-07-02 15:35:05 +02:00
Manuel Ebert
9265c3f850 Fixes xml header 2014-05-22 13:24:04 -07:00
Manuel Ebert
09066ee64d Fix encoding in tests 2014-05-22 12:16:26 -07:00
Manuel Ebert
91de932568 Tests for ignoring invalid DayOne entries 2014-04-16 14:35:03 -04:00
Manuel Ebert
00f122ed1a Tests for #153 2014-04-16 14:26:02 -04:00
Manuel Ebert
cabbbea694 Tests for fixing errors automatically 2013-11-03 14:38:41 -10:00
Manuel Ebert
49a540dbbf Tests for soft-deprecating passwords in config 2013-10-20 13:43:04 -07:00
Manuel Ebert
13b7d1c1df Tests for storing password in keychain 2013-10-17 16:26:49 -07:00
Manuel Ebert
c6c425093e Remove tests for having password in config 2013-10-17 16:00:45 -07:00
Manuel Ebert
974f5a0f9c Adds empty folder for testing 2013-08-28 13:37:18 -07:00
Manuel Ebert
1bab646c09 Tests for error messages on empty directories 2013-08-28 12:18:58 -07:00
Manuel Ebert
2a981d51e2 Tests for parsing DayOne entries without Timezone 2013-08-17 13:19:54 -07:00
Manuel Ebert
0fa981357e Initial support for DayOne integration testing 2013-08-17 11:59:51 -07:00
Manuel Ebert
d4cb4e64f6 Tests for filtering 2013-08-06 17:57:31 -07:00
Manuel Ebert
1dfbfc2eaa Tests for tagging 2013-07-23 21:02:03 -07:00
Manuel Ebert
19f6fd3672 Test for decrypting journals when password is saved in config 2013-07-22 21:26:21 +02:00
Manuel Ebert
dbf5caa971 Changes cleaning strategy 2013-07-22 21:19:30 +02:00