From 2a15ae6e14cda19ddd232f03b2eec0ce215515c6 Mon Sep 17 00:00:00 2001
From: Anonymus Raccoon
Date: Sat, 23 May 2020 19:17:31 +0200
Subject: [PATCH] Solving tests
---
Makefile | 2 +-
tests/tsource.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index ffbd9d7..151c5f8 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ $(NAME): $(OBJ)
$(CC) -o $(NAME) $(OBJ) $(LDFLAGS)
tests_run: clean
- $(CC) -o $(UT) $(TESTS) $(SRC) $(COVERAGE) $(CFLAGS) $(LDFLAGS)
+ $(CC) -o $(UT) $(TESTS) $(SRC) $(COVERAGE) -g $(CFLAGS) $(LDFLAGS)
$(UT)
func: all
diff --git a/tests/tsource.c b/tests/tsource.c
index 8e7c7b2..00f5803 100644
--- a/tests/tsource.c
+++ b/tests/tsource.c
@@ -15,7 +15,7 @@
Test(get_special_arg_at, at_arg)
{
- char **argv = split_str(strdup("source file a b c"), (char *[]) {" "});
+ char **argv = split_str(strdup("source file a b c"), (char *[]) {" ", NULL});
int argv_len = 5;
char *res = NULL;
@@ -26,7 +26,7 @@ Test(get_special_arg_at, at_arg)
Test(get_special_arg_star, at_arg)
{
- char **argv = split_str(strdup("source file a b c"), (char *[]) {" "});
+ char **argv = split_str(strdup("source file a b c"), (char *[]) {" ", NULL});
int argv_len = 5;
char *res = NULL;