Skip to content

Commit 23c5100

Browse files
committed
Improve config file platform test
1 parent 82adcb1 commit 23c5100

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

exiv2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ standards-defined metadata.
13261326
With [--Modify cmd](#Modify_cmd), quotation marks are use to surround the
13271327
*cmd*. The Windows command line requires double quotes to be
13281328
used, however generally, quotes inside that string, can be either single
1329-
or double. Generally, UNIX based systems can use pairs of single or
1329+
or double. Generally, Unix-based systems can use pairs of single or
13301330
double quotes in any position. In both systems, inner string quotation
13311331
marks may need to use the `\` escape sequence.
13321332

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

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

16431643
You can determine the name of the file and where it is searched for,
16441644
with the command:

tests/lens_tests/test_config_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77

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

1616

0 commit comments

Comments
 (0)