summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-18 16:59:04 +0100
committerDavid Robillard <d@drobilla.net>2020-12-18 17:38:31 +0100
commita9d60127562f5ce873494699c4df9495a4b2d9b4 (patch)
treef37baa73ec82f687668845773e6cee7f010a7564 /test
parent35d52ca7ae7521406075045784148f70de757ed9 (diff)
downloadlilv-a9d60127562f5ce873494699c4df9495a4b2d9b4.tar.gz
lilv-a9d60127562f5ce873494699c4df9495a4b2d9b4.tar.bz2
lilv-a9d60127562f5ce873494699c4df9495a4b2d9b4.zip
Check file contents rather than canonical paths in state tests
This makes the checks work when the files are not symlinks, as on Windows.
Diffstat (limited to 'test')
-rw-r--r--test/test_state.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/test_state.c b/test/test_state.c
index e057160..efa5cc5 100644
--- a/test/test_state.c
+++ b/test/test_state.c
@@ -631,8 +631,7 @@ test_to_files(void)
assert(lilv_path_exists(recfile_link_1));
// Check that link points to the corresponding copy
- char* const recfile_link_1_real = lilv_path_canonical(recfile_link_1);
- assert(!strcmp(recfile_link_1_real, recfile_copy_1));
+ assert(lilv_file_equals(recfile_link_1, recfile_copy_1));
// Run plugin again to modify recording file data
lilv_instance_run(instance, 2);
@@ -660,8 +659,7 @@ test_to_files(void)
assert(lilv_path_exists(recfile_link_2));
// Check that link points to the corresponding copy
- char* const recfile_link_2_real = lilv_path_canonical(recfile_link_2);
- assert(!strcmp(recfile_link_2_real, recfile_copy_2));
+ assert(lilv_file_equals(recfile_link_2, recfile_copy_2));
lilv_instance_free(instance);
lilv_dir_for_each(bundle_2_path, NULL, remove_file);
@@ -670,12 +668,10 @@ test_to_files(void)
lilv_remove(bundle_1_path);
cleanup_test_directories(dirs);
- free(recfile_link_2_real);
free(recfile_link_2);
free(recfile_copy_2);
lilv_state_free(state_2);
free(bundle_2_path);
- free(recfile_link_1_real);
free(recfile_link_1);
free(manifest_path);
free(recfile_copy_1);