diff options
author | Reuben Thomas <rrt@sc3d.org> | 2017-03-06 22:11:29 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2017-03-06 23:30:36 +0000 |
commit | 8c2daf870b6edb5e2504c0da44cf363880b61511 (patch) | |
tree | 6a49d275c60b393251d79941d260a8183788bd57 /tests | |
parent | d5aafe00da470b88f41f5f0ecc296ccbf1d2f0ba (diff) | |
download | enchant-8c2daf870b6edb5e2504c0da44cf363880b61511.tar.gz |
Overhaul configuration mechanisms
Have only one user_config_dir, so change API to enchant_get_user_config_dir,
returning a char *. Make ENCHANT_CONFIG_DIR override it, not supplement it:
this is intended for use by applications embedding Enchant which want to cut
off its external configuration, and for testing.
Look for modules only in one place, under the given prefix (which can be
overridden by ENCHANT_PREFIX_DIR).
The system enchant.ordering is moved to sysconfdir from pkglibdir. Little
point having two separate files, but make it configurable by the sysadmin.
Fix default path relative to g_get_system_data_dirs for finding hunspell
dictionaries (was still using one more suited to myspell).
Make a couple of C++ fixes to the uspell provider. Not currently being built.
Don’t look for Enchant config directly in home directory any more.
Rename some internal functions without leadiing underscore. No point doing
this for merely static functions, as we don’t with most names. Only leave
underscores where there is already a function with the name without the
underscore.
Reverse the order of directories in enchant_get_conf_dirs, so it doesn’t
have to be reversed by its only caller.
Update relevant tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 56cd12b..8341520 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,13 +3,15 @@ AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) AM_TESTS_ENVIRONMENT = \ ENCHANT_PREFIX_DIR=""; \ export ENCHANT_PREFIX_DIR; \ - rm -f test.pwl enchant; \ + ENCHANT_CONFIG_DIR="config"; \ + export ENCHANT_CONFIG_DIR; \ + rm -f test.pwl lib; \ mkdir -p lib/enchant; \ cp $(top_builddir)/providers/@objdir@/*@shlibext@ lib/enchant || :; cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \ chmod +w $(builddir)/test.pwl; -DISTCLEANFILES = test.pwl lib/enchant/*@shlibext@ +DISTCLEANFILES = test.pwl lib/enchant/*@shlibext@ config/* EXTRA_DIST = test.pwl.orig |