Skip to content

Commit

Permalink
Improve config file platform test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos committed Dec 20, 2021
1 parent 82adcb1 commit 23c5100
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions exiv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ standards-defined metadata.
With [--Modify cmd](#Modify_cmd), quotation marks are use to surround the
*cmd*. The Windows command line requires double quotes to be
used, however generally, quotes inside that string, can be either single
or double. Generally, UNIX based systems can use pairs of single or
or double. Generally, Unix-based systems can use pairs of single or
double quotes in any position. In both systems, inner string quotation
marks may need to use the `\` escape sequence.

Expand Down Expand Up @@ -1634,11 +1634,11 @@ For another example, see: https://www.exiv2.org/sample.html

# 12 CONFIGURATION FILE
**exiv2** can read an optional configuration file, which allows
additional lens definitions to be added to translated output. On UNIX
based systems, this file is called *.exiv2* and on Windows (including MinGW),
*exiv2.ini*. The file is searched for first in the current directory,
then in the home directory (on UNIX based systems, `~/` and on Windows,
`%USERPROFILE%\\`).
additional lens definitions to be added to translated output. On Unix-based
systems (including Cygwin), this file is called *.exiv2* and on Windows
(including MinGW), *exiv2.ini*. The file is searched for first in the
current directory, then in the home directory (`$HOME` on Unix-based
systems, and `%USERPROFILE%` on Windows).

You can determine the name of the file and where it is searched for,
with the command:
Expand Down
4 changes: 2 additions & 2 deletions tests/lens_tests/test_config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


# copy the example config file into current working directory
# and name it ".exiv2" on linux or "exiv2.ini" on Win
# and name it "exiv2.ini" on Win or ".exiv2" on other platforms
class TmpConfigFile(system_tests.FileDecoratorBase):
def setUp_file_action(self, expanded_file_name):
config_file_path = os.path.dirname(os.path.abspath(__file__))
fname = ".exiv2" if sys.platform == "linux" or sys.platform == "darwin" else "exiv2.ini"
fname = os.path.basename(system_tests.BT.verbose_version().get('config_path'))
return shutil.copyfile(expanded_file_name, os.path.join(config_file_path, fname))


Expand Down

0 comments on commit 23c5100

Please sign in to comment.