From 5bc5596f604fb87dffbfdf44ce2395b16bf01297 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sun, 8 Mar 2020 14:49:23 -0700 Subject: [PATCH] version bump to 1.8.1 --- changelog.txt | 5 +++-- jc/cli.py | 2 +- setup.py | 2 +- tests/test_ls.py | 12 ++++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 43e55c6b..7b71da39 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,8 @@ jc changelog -202003xx v1.x.x -- Code optimizations by https://github.com/philippeitis +20200308 v1.8.1 +- CLI and history parser optimizations by https://github.com/philippeitis +- Refactored magic syntax function and added tests (https://github.com/philippeitis) - Github actions for CI testing on multiple platforms by https://github.com/philippeitis - Updated ls parser to fix parsing error in OSX with -lR when there are empty folders diff --git a/jc/cli.py b/jc/cli.py index 7f16cf0e..a89d4eed 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -13,7 +13,7 @@ import jc.utils class info(): - version = '1.8.0' + version = '1.8.1' description = 'jc cli output JSON conversion tool' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' diff --git a/setup.py b/setup.py index 6eabe9cc..85fa9afb 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md', 'r') as f: setuptools.setup( name='jc', - version='1.8.0', + version='1.8.1', author='Kelly Brazil', author_email='kellyjonbrazil@gmail.com', description='This tool serializes the output of popular command line tools and filetypes to structured JSON output.', diff --git a/tests/test_ls.py b/tests/test_ls.py index 68c3cabf..6a643a3d 100644 --- a/tests/test_ls.py +++ b/tests/test_ls.py @@ -109,6 +109,9 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ls-newlines.out'), 'r', encoding='utf-8') as f: self.osx_10_14_6_ls_newlines = f.read() + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ls-lR-empty-folder.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ls_lR_empty_folder = f.read() + # output with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ls.json'), 'r', encoding='utf-8') as f: self.centos_7_7_ls_json = json.loads(f.read()) @@ -209,6 +212,9 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ls-newlines.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_ls_newlines_json = json.loads(f.read()) + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ls-lR-empty-folder.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ls_lR_empty_folder_json = json.loads(f.read()) + def test_ls_centos_7_7(self): """ Test plain 'ls /' on Centos 7.7 @@ -407,6 +413,12 @@ class MyTests(unittest.TestCase): """ self.assertEqual(jc.parsers.ls.parse(self.osx_10_14_6_ls_newlines, quiet=True), self.osx_10_14_6_ls_newlines_json) + def test_ls_lR_empty_folder_osx_10_14_6(self): + """ + Test 'ls -lR' for empty directories on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.ls.parse(self.osx_10_14_6_ls_lR_empty_folder, quiet=True), self.osx_10_14_6_ls_lR_empty_folder_json) + if __name__ == '__main__': unittest.main()