use notcurses_data_dir() in tester, fetch

pull/2401/head
nick black 3 years ago
parent d85a0b213a
commit 75bd0dd0bc
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -198,7 +198,7 @@ endif()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
file(GLOB COMPATSRC CONFIGURE_DEPENDS src/compat/compat.c)
file(GLOB COMPATSRC CONFIGURE_DEPENDS src/compat/*.c)
############################################################################
# libnotcurses-core (core shared library, core static library)
@ -625,7 +625,7 @@ endif()
############################################################################
# ncneofetch
file(GLOB FETCHSRCS CONFIGURE_DEPENDS src/fetch/*.c)
file(GLOB FETCHSRCS CONFIGURE_DEPENDS src/fetch/*.c src/compat/*.c)
add_executable(ncneofetch ${FETCHSRCS} ${COMPATSRC})
target_include_directories(ncneofetch
BEFORE
@ -694,7 +694,7 @@ if(${BUILD_TESTING})
if(${USE_CPP})
#set(CMAKE_CTEST_ARGUMENTS "-V")
if(${USE_DOCTEST})
file(GLOB TESTSRCS CONFIGURE_DEPENDS src/tests/*.cpp)
file(GLOB TESTSRCS CONFIGURE_DEPENDS src/tests/*.cpp src/compat/*.c)
add_executable(notcurses-tester ${TESTSRCS})
target_include_directories(notcurses-tester
BEFORE

@ -28,12 +28,13 @@
static inline char*
find_data(const char* datum){
const char* datadir = NOTCURSES_SHARE;
char* datadir = notcurses_data_dir();
const size_t dlen = strlen(datadir);
char* path = malloc(dlen + 1 + strlen(datum) + 1);
strcpy(path, datadir);
path[dlen] = path_separator();
strcpy(path + dlen + 1, datum);
free(datadir);
return path;
}

@ -1398,13 +1398,9 @@ build_cflow_automaton(inputctx* ictx){
{ "[\\N;\\N:\\Nu", kitty_cb_complex, },
{ "[\\N;\\N;\\N~", xtmodkey_cb, },
{ "[\\N;\\N:\\N~", kitty_cb_functional, },
/*
{ "[1;\\NP", legacy_cb_f1, },
*/
{ "[1;\\NQ", legacy_cb_f2, },
/*
{ "[1;\\NR", legacy_cb_f3, },
*/
//{ "[1;\\NR", legacy_cb_f3, },
{ "[1;\\NS", legacy_cb_f4, },
{ "[1;\\ND", legacy_cb_left, },
{ "[1;\\NC", legacy_cb_right, },

@ -8,7 +8,7 @@
#include <climits>
#include <sys/stat.h>
const char* datadir = NOTCURSES_SHARE;
const char* datadir = notcurses_data_dir();
// NCLOGLEVEL_INFO for initial testing framework creation. we then switch to
// command line-specified loglevel, _SILENT if none specified.
ncloglevel_e cliloglevel = NCLOGLEVEL_INFO;

Loading…
Cancel
Save