diff --git a/AUTHORS.rst b/AUTHORS.rst
index ea00ac7a00e..1efef487594 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -40,6 +40,7 @@ The following organizations or individuals have contributed to ScanCode:
- Johannes Najjar @joshovi
- Jose Nazario @paralax
- Kevin Ji @KevinJi22
+- Lali Akhil Raj @lf32
- Lemo Shi @lemoshi
- Li Ha @linexb
- Mankaran Singh @MankaranSingh
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2a7251d430b..403882f318b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -324,6 +324,15 @@ Development environment and Code API changes:
environment variable. There is no need to replace the regen=False with
regen=True in the code.
+Miscellaneous
+--------------
+
+- Added support for usage of shortcut flags
+ - `-A` or `--about`
+ - `-q` or `--quiet`
+ - `-v` or `--verbose`
+ - `-V` or `--version` can be used.
+
30.1.0 - 2021-09-25
--------------------
diff --git a/docs/source/rst_snippets/core_options.rst b/docs/source/rst_snippets/core_options.rst
index 4d6ae4d8a5a..8845f37316d 100644
--- a/docs/source/rst_snippets/core_options.rst
+++ b/docs/source/rst_snippets/core_options.rst
@@ -4,9 +4,9 @@ All "Core" Scan Options
-n, --processes INTEGER Scan ```` using n parallel processes.
[Default: 1]
---verbose Print verbose file-by-file progress messages.
+-v, --verbose Print verbose file-by-file progress messages.
---quiet Do not print summary or progress messages.
+-q, --quiet Do not print summary or progress messages.
--timeout FLOAT Stop scanning a file if scanning takes longer
than a timeout in seconds. [Default: 120]
diff --git a/src/scancode/cli.py b/src/scancode/cli.py
index b2e2d251afb..4649c62a471 100644
--- a/src/scancode/cli.py
+++ b/src/scancode/cli.py
@@ -211,13 +211,13 @@ def validate_depth(ctx, param, value):
f'[default: {DEFAULT_TIMEOUT} seconds]',
help_group=cliutils.CORE_GROUP, sort_order=10, cls=PluggableCommandLineOption)
-@click.option('--quiet',
+@click.option('-q', '--quiet',
is_flag=True,
conflicting_options=['verbose'],
help='Do not print summary or progress.',
help_group=cliutils.CORE_GROUP, sort_order=20, cls=PluggableCommandLineOption)
-@click.option('--verbose',
+@click.option('-v', '--verbose',
is_flag=True,
conflicting_options=['quiet'],
help='Print progress as file-by-file path instead of a progress bar. '
@@ -258,7 +258,7 @@ def validate_depth(ctx, param, value):
@click.help_option('-h', '--help',
help_group=cliutils.DOC_GROUP, sort_order=10, cls=PluggableCommandLineOption)
-@click.option('--about',
+@click.option('-A', '--about',
is_flag=True,
is_eager=True,
expose_value=False,
@@ -266,7 +266,7 @@ def validate_depth(ctx, param, value):
help='Show information about ScanCode and licensing and exit.',
help_group=cliutils.DOC_GROUP, sort_order=20, cls=PluggableCommandLineOption)
-@click.option('--version',
+@click.option('-V', '--version',
is_flag=True,
is_eager=True,
expose_value=False,
diff --git a/tests/scancode/data/help/help.txt b/tests/scancode/data/help/help.txt
index 747550db517..190dc310455 100644
--- a/tests/scancode/data/help/help.txt
+++ b/tests/scancode/data/help/help.txt
@@ -137,8 +137,8 @@ Options:
-n, --processes INT Set the number of parallel processes to use. Disable
parallel processing if 0. Also disable threading if
-1. [default: 1]
- --quiet Do not print summary or progress.
- --verbose Print progress as file-by-file path instead of a
+ -q, --quiet Do not print summary or progress.
+ -v, --verbose Print progress as file-by-file path instead of a
progress bar. Print verbose scan counters.
--from-json Load codebase from one or more JSON scan
file(s).
@@ -162,8 +162,8 @@ Options:
documentation:
-h, --help Show this message and exit.
- --about Show information about ScanCode and licensing and exit.
- --version Show the version and exit.
+ -A, --about Show information about ScanCode and licensing and exit.
+ -V, --version Show the version and exit.
--examples Show command examples and exit.
--list-packages Show the list of supported package manifest parsers and exit.
--plugins Show the list of available ScanCode plugins and exit.
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-linux.json-q b/tests/scancode/data/unicodepath/unicodepath.expected-linux.json-q
new file mode 100644
index 00000000000..4b61a2c743b
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-linux.json-q
@@ -0,0 +1,175 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--quiet": true,
+ "--strip-root": true,
+ "--url": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "output_format_version": "2.0.0",
+ "message": null,
+ "errors": [],
+ "warnings": [],
+ "extra_data": {
+ "system_environment": {
+ "operating_system": "linux",
+ "cpu_architecture": "64",
+ "platform": "Linux-5.4.0-109-generic-x86_64-with-Ubuntu-18.04-bionic",
+ "platform_version": "#123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022",
+ "python_version": "3.6.9 (default, Mar 15 2022, 13:55:28) \n[GCC 8.4.0]"
+ },
+ "spdx_license_list_version": "3.16",
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328",
+ "base_name": "\u03e8\u1f40\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328a",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328a",
+ "base_name": "\u03e8\u1f40\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-linux.json-v b/tests/scancode/data/unicodepath/unicodepath.expected-linux.json-v
new file mode 100644
index 00000000000..624be89bc67
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-linux.json-v
@@ -0,0 +1,174 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--strip-root": true,
+ "--url": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "output_format_version": "2.0.0",
+ "message": null,
+ "errors": [],
+ "warnings": [],
+ "extra_data": {
+ "system_environment": {
+ "operating_system": "linux",
+ "cpu_architecture": "64",
+ "platform": "Linux-5.4.0-109-generic-x86_64-with-Ubuntu-18.04-bionic",
+ "platform_version": "#123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022",
+ "python_version": "3.6.9 (default, Mar 15 2022, 13:55:28) \n[GCC 8.4.0]"
+ },
+ "spdx_license_list_version": "3.16",
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328",
+ "base_name": "\u03e8\u1f40\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328a",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328a",
+ "base_name": "\u03e8\u1f40\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-mac.json-q b/tests/scancode/data/unicodepath/unicodepath.expected-mac.json-q
new file mode 100644
index 00000000000..a3fac864b02
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-mac.json-q
@@ -0,0 +1,165 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--quiet": true,
+ "--strip-root": true,
+ "--url": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "message": null,
+ "errors": [],
+ "extra_data": {
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja koris\u030ctenjem Ka\u0308rkka\u0308inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja koris\u030ctenjem Ka\u0308rkka\u0308inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja koris\u030ctenjem Ka\u0308rkka\u0308inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u03bf\u0313\u2328",
+ "type": "file",
+ "name": "\u03e8\u03bf\u0313\u2328",
+ "base_name": "\u03e8\u03bf\u0313\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u03bf\u0313\u2328a",
+ "type": "file",
+ "name": "\u03e8\u03bf\u0313\u2328a",
+ "base_name": "\u03e8\u03bf\u0313\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-mac.json-v b/tests/scancode/data/unicodepath/unicodepath.expected-mac.json-v
new file mode 100644
index 00000000000..988b5b0253e
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-mac.json-v
@@ -0,0 +1,165 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--strip-root": true,
+ "--url": true,
+ "--verbose": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "message": null,
+ "errors": [],
+ "extra_data": {
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja koris\u030ctenjem Ka\u0308rkka\u0308inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja koris\u030ctenjem Ka\u0308rkka\u0308inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja koris\u030ctenjem Ka\u0308rkka\u0308inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u03bf\u0313\u2328",
+ "type": "file",
+ "name": "\u03e8\u03bf\u0313\u2328",
+ "base_name": "\u03e8\u03bf\u0313\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u03bf\u0313\u2328a",
+ "type": "file",
+ "name": "\u03e8\u03bf\u0313\u2328a",
+ "base_name": "\u03e8\u03bf\u0313\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-mac14.json-q b/tests/scancode/data/unicodepath/unicodepath.expected-mac14.json-q
new file mode 100644
index 00000000000..88353ef8d57
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-mac14.json-q
@@ -0,0 +1,165 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--quiet": true,
+ "--strip-root": true,
+ "--url": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "message": null,
+ "errors": [],
+ "extra_data": {
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328",
+ "base_name": "\u03e8\u1f40\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328a",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328a",
+ "base_name": "\u03e8\u1f40\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-mac14.json-v b/tests/scancode/data/unicodepath/unicodepath.expected-mac14.json-v
new file mode 100644
index 00000000000..1984ad7124b
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-mac14.json-v
@@ -0,0 +1,165 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--strip-root": true,
+ "--url": true,
+ "--verbose": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "message": null,
+ "errors": [],
+ "extra_data": {
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328",
+ "base_name": "\u03e8\u1f40\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328a",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328a",
+ "base_name": "\u03e8\u1f40\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-win.json-q b/tests/scancode/data/unicodepath/unicodepath.expected-win.json-q
new file mode 100644
index 00000000000..88353ef8d57
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-win.json-q
@@ -0,0 +1,165 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--quiet": true,
+ "--strip-root": true,
+ "--url": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "message": null,
+ "errors": [],
+ "extra_data": {
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328",
+ "base_name": "\u03e8\u1f40\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328a",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328a",
+ "base_name": "\u03e8\u1f40\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/data/unicodepath/unicodepath.expected-win.json-v b/tests/scancode/data/unicodepath/unicodepath.expected-win.json-v
new file mode 100644
index 00000000000..1984ad7124b
--- /dev/null
+++ b/tests/scancode/data/unicodepath/unicodepath.expected-win.json-v
@@ -0,0 +1,165 @@
+{
+ "headers": [
+ {
+ "tool_name": "scancode-toolkit",
+ "options": {
+ "input": "",
+ "--copyright": true,
+ "--email": true,
+ "--info": true,
+ "--json": "",
+ "--license": true,
+ "--package": true,
+ "--strip-root": true,
+ "--url": true,
+ "--verbose": true
+ },
+ "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
+ "message": null,
+ "errors": [],
+ "extra_data": {
+ "files_count": 3
+ }
+ }
+ ],
+ "dependencies": [],
+ "packages": [],
+ "files": [
+ {
+ "path": "unicodepath",
+ "type": "directory",
+ "name": "unicodepath",
+ "base_name": "unicodepath",
+ "extension": "",
+ "size": 0,
+ "sha1": null,
+ "md5": null,
+ "sha256": null,
+ "mime_type": null,
+ "file_type": null,
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": false,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 3,
+ "dirs_count": 0,
+ "size_count": 20,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "type": "file",
+ "name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma.pdf",
+ "base_name": "Izgradnja sufiksnog polja kori\u0161tenjem K\u00e4rkk\u00e4inen \u2013 Sandersovog algoritma",
+ "extension": ".pdf",
+ "size": 2,
+ "sha1": "71853c6197a6a7f222db0f1978c7cb232b87c5ee",
+ "md5": "e1c06d85ae7b8b032bef47e42e4c08f9",
+ "sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328",
+ "base_name": "\u03e8\u1f40\u2328",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ },
+ {
+ "path": "unicodepath/\u03e8\u1f40\u2328a",
+ "type": "file",
+ "name": "\u03e8\u1f40\u2328a",
+ "base_name": "\u03e8\u1f40\u2328a",
+ "extension": "",
+ "size": 9,
+ "sha1": "37aa63c77398d954473262e1a0057c1e632eda77",
+ "md5": "552e21cd4cd9918678e3c1a0df491bc3",
+ "sha256": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05aed2",
+ "mime_type": "text/plain",
+ "file_type": "ASCII text, with no line terminators",
+ "programming_language": null,
+ "is_binary": false,
+ "is_text": true,
+ "is_archive": false,
+ "is_media": false,
+ "is_source": false,
+ "is_script": false,
+ "licenses": [],
+ "license_expressions": [],
+ "percentage_of_license_text": 0,
+ "copyrights": [],
+ "holders": [],
+ "authors": [],
+ "package_data": [],
+ "for_packages": [],
+ "emails": [],
+ "urls": [],
+ "files_count": 0,
+ "dirs_count": 0,
+ "size_count": 0,
+ "scan_errors": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/scancode/test_cli.py b/tests/scancode/test_cli.py
index 02a94bad2ff..81138aa8671 100644
--- a/tests/scancode/test_cli.py
+++ b/tests/scancode/test_cli.py
@@ -53,7 +53,7 @@ def test_package_option_detects_packages(monkeypatch):
def test_verbose_option_with_packages(monkeypatch):
test_dir = test_env.get_test_loc('package', copy=True)
result_file = test_env.get_temp_file('json')
- args = ['--package', '--verbose', test_dir, '--json', result_file]
+ args = ['--package', '-v', test_dir, '--json', result_file]
result = run_scan_click(args, monkeypatch=monkeypatch)
assert 'package.json' in result.output
assert os.path.exists(result_file)
@@ -417,11 +417,17 @@ def test_scan_does_not_fail_when_scanning_unicode_files_and_paths_verbose():
result = check_scan_does_not_fail_when_scanning_unicode_files_and_paths('--verbose')
assert result.output
+ result = check_scan_does_not_fail_when_scanning_unicode_files_and_paths('-v')
+ assert result.output
+
def test_scan_does_not_fail_when_scanning_unicode_files_and_paths_quiet():
result = check_scan_does_not_fail_when_scanning_unicode_files_and_paths('--quiet')
assert not result.output
+ result = check_scan_does_not_fail_when_scanning_unicode_files_and_paths('-q')
+ assert not result.output
+
@pytest.mark.skipif(on_windows, reason='Python tar cannot extract these files on Windows')
def test_scan_does_not_fail_when_scanning_unicode_test_files_from_express():
@@ -451,7 +457,7 @@ def test_scan_can_handle_licenses_with_unicode_metadata():
def test_scan_quiet_to_file_does_not_echo_anything():
test_dir = test_env.extract_test_tar('info/basic.tgz')
result_file = test_env.get_temp_file('json')
- args = ['--quiet', '--info', test_dir, '--json', result_file]
+ args = ['-q', '--info', test_dir, '--json', result_file]
result = run_scan_click(args)
assert not result.output
@@ -464,7 +470,7 @@ def test_scan_quiet_to_stdout_only_echoes_json_results():
assert not result_to_file.output
# also test with an output of JSON to stdout
- args = ['--quiet', '--info', test_dir, '--json-pp', '-']
+ args = ['-q', '--info', test_dir, '--json-pp', '-']
result_to_stdout = run_scan_click(args)
# outputs to file or stdout should be identical
@@ -567,7 +573,7 @@ def test_scan_logs_errors_messages_not_verbosely_on_stderr_with_multiprocessing(
def test_scan_logs_errors_messages_verbosely():
test_file = test_env.get_test_loc('errors/many_copyrights.c')
# we use a short timeout and a --test-slow-mode --email scan to simulate an error
- args = ['-e', '--test-slow-mode', '--verbose', '-n', '0', '--timeout', '0.0001',
+ args = ['-e', '--test-slow-mode', '-v', '-n', '0', '--timeout', '0.0001',
test_file, '--json', '-']
_rc, stdout, stderr = run_scan_plain(args, expected_rc=1)
assert 'Some files failed to scan properly:' in stderr
@@ -935,10 +941,16 @@ def test_VirtualCodebase_output_with_from_json_is_same_as_original():
def test_getting_version_returns_valid_yaml():
import saneyaml
import scancode_config
- args = ['--version']
- result = run_scan_click(args)
- assert saneyaml.load(result.output) == {
+ test_version = {
'ScanCode version': f'{scancode_config.__version__}',
'ScanCode Output Format version': f'{scancode_config.__output_format_version__}',
'SPDX License list version': f'{scancode_config.spdx_license_list_version}'
}
+
+ args = ['--version']
+ result = run_scan_click(args)
+ assert saneyaml.load(result.output) == test_version
+
+ args = ['-V']
+ result = run_scan_click(args)
+ assert saneyaml.load(result.output) == test_version