- path = test_get_path("compose/en_US.UTF-8/Compose");
- file = fopen(path, "r");
+ path = test_get_path("locale/en_US.UTF-8/Compose");
+ file = fopen(path, "rb");
+ if (file == NULL) {
+ perror(path);
+ free(path);
+ xkb_context_unref(ctx);
+ return -1;
+ }