Commit graph

22 commits

Author SHA1 Message Date
Jonathan Wren
302d353c4d Fix up tests and related issues
Upgrade poetry if already installed
Get rid of test function that was causing windows problems
2020-04-10 11:51:56 -07:00
Aaron Lichtman
9e5d160bbd Pretty print journal entries (#692)
* Pretty print journal entry titles and dates.

Changes appearance of all jrnl viewing commands, such as $ jrnl --short and
$ jrnl -n {NUM}.

Fix #508

* Removed extra newline at end of title

* Use ansiwrap to properly wrap strings with ANSI escapes

* Add ansiwrap to pyproject.toml

* Allow configuration of colors

- Replaced raw escapes with colorama
- Added colors key to config
- Add checks for validity of color values

* Add color configuration documentation

* Fix broken tests due to config change

* Add tests for colors in configs

- Identifying invalid color configs
- Upgrading config from no colors -> colors

* Add colorama dependency for all platforms

* Allow users to disable colorization of output

* Update poetry.lock

* Add tag and body color customization options

* Fix colorization of tags in title and body

* Updated tests to use no color by default

* Change pass to continue in verify_config()

* Better style in Entry.py

* Reduce code duplication for tag highlighting

- Breaks "unreadable date" regression test for unknown reason

* Properly colorize tags and print body

* Reformatting and clean up

* Replace list comprehension with generator

* Handle invalid colors by not using a color

* Process ANSI escapes properly with behave

* Fixed the 'spaces after tags directly next to punctuation' bug

Broke processing of tags next to any punctuation at all

* Closer to working tag colorization but not perfect

* Add tests printing for multiline journals

Fix #717

* Correctly indent first line of multiline entry

* Add test for multiline entries with tags

* Remove redundant UNICODE flag

* Progress towards proper tag colorization and body formatting

* Fix newline colorization bug

Debug code left intact since there are more bugs to fix :/

* And now the space just ends up before the tag instead of after it

* Fix assertion syntax warning

* Moved tag test to tagging.feature file

* Strip out debug code and clean up

* Bold datetimes in title

* Bold all titles

Fix #720

* Remove PY2 and PY3 constants

* Fix regression in features/steps/core.py

* Fix tag_regex

* Remove redundant re.UNICODE flag

* Remove extraneous code
2020-04-10 11:51:56 -07:00
Micah Jerome Ellison
32bd4a2b71 Restore emoji test now that it works in Windows Travis builds 2020-04-10 11:51:56 -07:00
Micah Jerome Ellison
a3a161376e Keep skip_win directive for empty entry test that still stalls on Travis 2020-04-10 11:51:56 -07:00
Micah Jerome Ellison
923e0c25d5 Remove all skip_win directives now that Travis is not mangling newlines on Windows 2020-04-10 11:51:56 -07:00
Jonathan Wren
5f31e1ab39 remove broken test (windows can't handle emoji) 2020-04-10 11:51:56 -07:00
Jonathan Wren
4086573f9d [#766] Skip another broken windows test 2020-04-10 11:51:56 -07:00
Jonathan Wren
da55914ec3 [#766] Skip the broken test on windows for now 2020-04-10 11:51:56 -07:00
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
Manuel Ebert
22ae53407e Split tests 2015-04-20 14:13:34 +02:00
flight16
a212e86503 Fix breaking test submitted in ebee196444. 2015-04-13 23:23:54 +09:00
flight16
ebee196444 Add single letter alias -s for option --short
--short was being used in a test for date logic, but I added a second
test for explicitness.
2015-04-13 09:08:43 +09:00
Manuel Ebert
c508e0c574 Update all tests to new time format 2015-04-05 03:25:39 +04: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
Manuel Ebert
1822f50c70 Tests for date parsing and -on 2014-07-21 13:30:36 +09:00
Manuel Ebert
bf9adeb28a Tests for new structure 2013-11-29 10:23:16 -08:00
Manuel Ebert
279547c350 Tests for using stderr prompts 2013-07-22 12:04:32 +02:00
Manuel Ebert
13f8e668dc Mock stdin 2013-07-19 12:44:39 +02:00
Manuel Ebert
cb9beac711 Emoji support 2013-07-19 11:46:02 +02:00
Manuel Ebert
af16165159 Tests for writing entries from the command line 2013-07-19 11:36:39 +02:00
Manuel Ebert
47c90b6d40 Core testing 2013-07-18 22:49:22 +02:00