Commit graph

29 commits

Author SHA1 Message Date
Jonathan Wren
4d768ae433
fix up tests and related issues 2020-02-29 15:29:29 -08:00
Aaron Lichtman
47e0305aa0
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-02-29 15:29:16 -08:00
Micah Ellison
aaa2efddec Restore emoji test now that it works in Windows Travis builds 2020-02-08 13:54:39 -08:00
Jonathan Wren
2d92201157
remove broken test (windows can't handle emoji) 2020-01-04 13:42:01 -08:00
Jonathan Wren
5434d476de
[#766] Skip another broken windows test 2020-01-04 13:42:00 -08:00
Jonathan Wren
686ccaae3b
[#766] Skip the broken test on windows for now 2020-01-04 13:41:58 -08:00
Aaron Lichtman
7fbb5db5e7
Fix no stdin input test 2019-11-18 15:34:31 +01:00
Aaron Lichtman
e4012426ca
Update features/core.feature
Co-Authored-By: pspeter <peter.schmidb@gmail.com>
2019-11-17 02:07:06 +01:00
Aaron Lichtman
b793ce5d6c
Fix test? 2019-11-17 01:57:19 +01:00
Aaron Lichtman
0aee900ffc
Fix test? 2019-11-17 01:54:49 +01:00
Aaron Lichtman
455261c55e
Add test for empty stdin input 2019-11-17 01:49:46 +01:00
Aaron Lichtman
5d75bc25c7
Fix test? 2019-11-16 14:49:07 +01:00
Aaron Lichtman
c23efa7f80
Fix test? 2019-11-16 14:42:39 +01:00
Aaron Lichtman
ccb55392dd
Check message on stderr and patch subprocess.call 2019-11-16 13:18:14 +01:00
Aaron Lichtman
d378e2522d
Add comment explaining discrepancy between expected and asserted output 2019-11-15 09:38:20 +01:00
Aaron Lichtman
7a90f4076d
Add test for aborting jrnl entry from editor 2019-11-15 09:27:01 +01:00
Manuel Ebert
08fbd0d960 Split tests 2015-04-20 14:13:34 +02:00
flight16
35b9827eb1 Fix breaking test submitted in b2a7d1f30e. 2015-04-13 23:23:54 +09:00
flight16
b2a7d1f30e 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
812d289740 Update all tests to new time format 2015-04-05 03:25:39 +04:00
Manuel Ebert
be009b08b4 Converts tests to YAML 2014-09-12 15:28:12 -07:00
Manuel Ebert
cbab596b43 Fixes config tests 2014-09-12 14:22:45 -07:00
Manuel Ebert
41d093cc19 Tests for date parsing and -on 2014-07-21 13:30:36 +09:00
Manuel Ebert
1c7f0b351d Tests for new structure 2013-11-29 10:23:16 -08:00
Manuel Ebert
0b7b88dcf0 Tests for using stderr prompts 2013-07-22 12:04:32 +02:00
Manuel Ebert
6abd7d5b68 Mock stdin 2013-07-19 12:44:39 +02:00
Manuel Ebert
3a4c87ca4c Emoji support 2013-07-19 11:46:02 +02:00
Manuel Ebert
6521d55a2b Tests for writing entries from the command line 2013-07-19 11:36:39 +02:00
Manuel Ebert
783603fb1c Core testing 2013-07-18 22:49:22 +02:00