mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
use notcurses_data_dir() in tester, fetch
This commit is contained in:
parent
d85a0b213a
commit
75bd0dd0bc
@ -198,7 +198,7 @@ endif()
|
|||||||
|
|
||||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
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)
|
# libnotcurses-core (core shared library, core static library)
|
||||||
@ -625,7 +625,7 @@ endif()
|
|||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# ncneofetch
|
# 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})
|
add_executable(ncneofetch ${FETCHSRCS} ${COMPATSRC})
|
||||||
target_include_directories(ncneofetch
|
target_include_directories(ncneofetch
|
||||||
BEFORE
|
BEFORE
|
||||||
@ -694,7 +694,7 @@ if(${BUILD_TESTING})
|
|||||||
if(${USE_CPP})
|
if(${USE_CPP})
|
||||||
#set(CMAKE_CTEST_ARGUMENTS "-V")
|
#set(CMAKE_CTEST_ARGUMENTS "-V")
|
||||||
if(${USE_DOCTEST})
|
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})
|
add_executable(notcurses-tester ${TESTSRCS})
|
||||||
target_include_directories(notcurses-tester
|
target_include_directories(notcurses-tester
|
||||||
BEFORE
|
BEFORE
|
||||||
|
@ -28,12 +28,13 @@
|
|||||||
|
|
||||||
static inline char*
|
static inline char*
|
||||||
find_data(const char* datum){
|
find_data(const char* datum){
|
||||||
const char* datadir = NOTCURSES_SHARE;
|
char* datadir = notcurses_data_dir();
|
||||||
const size_t dlen = strlen(datadir);
|
const size_t dlen = strlen(datadir);
|
||||||
char* path = malloc(dlen + 1 + strlen(datum) + 1);
|
char* path = malloc(dlen + 1 + strlen(datum) + 1);
|
||||||
strcpy(path, datadir);
|
strcpy(path, datadir);
|
||||||
path[dlen] = path_separator();
|
path[dlen] = path_separator();
|
||||||
strcpy(path + dlen + 1, datum);
|
strcpy(path + dlen + 1, datum);
|
||||||
|
free(datadir);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1398,13 +1398,9 @@ build_cflow_automaton(inputctx* ictx){
|
|||||||
{ "[\\N;\\N:\\Nu", kitty_cb_complex, },
|
{ "[\\N;\\N:\\Nu", kitty_cb_complex, },
|
||||||
{ "[\\N;\\N;\\N~", xtmodkey_cb, },
|
{ "[\\N;\\N;\\N~", xtmodkey_cb, },
|
||||||
{ "[\\N;\\N:\\N~", kitty_cb_functional, },
|
{ "[\\N;\\N:\\N~", kitty_cb_functional, },
|
||||||
/*
|
|
||||||
{ "[1;\\NP", legacy_cb_f1, },
|
{ "[1;\\NP", legacy_cb_f1, },
|
||||||
*/
|
|
||||||
{ "[1;\\NQ", legacy_cb_f2, },
|
{ "[1;\\NQ", legacy_cb_f2, },
|
||||||
/*
|
//{ "[1;\\NR", legacy_cb_f3, },
|
||||||
{ "[1;\\NR", legacy_cb_f3, },
|
|
||||||
*/
|
|
||||||
{ "[1;\\NS", legacy_cb_f4, },
|
{ "[1;\\NS", legacy_cb_f4, },
|
||||||
{ "[1;\\ND", legacy_cb_left, },
|
{ "[1;\\ND", legacy_cb_left, },
|
||||||
{ "[1;\\NC", legacy_cb_right, },
|
{ "[1;\\NC", legacy_cb_right, },
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <climits>
|
#include <climits>
|
||||||
#include <sys/stat.h>
|
#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
|
// NCLOGLEVEL_INFO for initial testing framework creation. we then switch to
|
||||||
// command line-specified loglevel, _SILENT if none specified.
|
// command line-specified loglevel, _SILENT if none specified.
|
||||||
ncloglevel_e cliloglevel = NCLOGLEVEL_INFO;
|
ncloglevel_e cliloglevel = NCLOGLEVEL_INFO;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user