]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
text: point the test to the bundled location of the text files
authorBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 3 Nov 2021 13:54:00 +0000 (14:54 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 3 Nov 2021 13:54:00 +0000 (14:54 +0100)
tests/Makefile.am
tests/mlmmj.c

index df7d531f101a38a118afdad1977c91bacadfbd30..483637ecc5a67ecb46a4d3e23a547b70749a256f 100644 (file)
@@ -7,7 +7,7 @@ mlmmj_SOURCES = mlmmj.c $(top_srcdir)/src/prepstdreply.c $(top_srcdir)/include/p
               $(top_srcdir)/src/strgen.c $(top_srcdir)/src/random-int.c $(top_srcdir)/src/readn.c \
               $(top_srcdir)/src/log_error.c $(top_srcdir)/src/chomp.c $(top_srcdir)/src/mygetline.c $(top_srcdir)/src/unistr.c \
               $(top_srcdir)/src/mlmmj.c
-mlmmj_CFLAGS = @ATF_CFLAGS@ -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' -I$(top_srcdir)/include
+mlmmj_CFLAGS = @ATF_CFLAGS@ -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' -I$(top_srcdir)/include -DSRCDIR='"@abs_top_srcdir@"'
 mlmmj_LDADD =  @ATF_LIBS@
 
 test_scripts = mlmmj-list.sh \
index 19efff2a8d5142b4b2ba26f8eb56c7f43b1dbe56..6a6ed3eb06efdcbb6670c4af72b3683c3659ef3c 100644 (file)
@@ -176,6 +176,8 @@ ATF_TC_BODY(open_text, tc)
        mlmmj_list_init(&list);
        list.dir = "list";
        ATF_CHECK(mlmmj_list_open(&list));
+       list.defaulttext = SRCDIR "/listtexts/default";
+       list.entext = SRCDIR "/listtexts/en";
        text *txt = open_text(&list, "finish", "sub", "request", "normal", "sub-confirm");
        ATF_CHECK(txt != NULL);
 }