Skip to content

Commit

Permalink
Move test stuff into 'tests' directory
Browse files Browse the repository at this point in the history
  • Loading branch information
semitrivial committed Dec 7, 2016
1 parent 2c0cdc5 commit 5f9a412
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
all:
gcc -g -Wall csv.c split.c fread_csv_line.c test.c -o test
gcc -g -Wall csv.c split.c fread_csv_line.c tests/test.c -o test
6 changes: 2 additions & 4 deletions test.c → tests/test.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>
#include <string.h>
#include "csv.h"
#include "../csv.h"

int test_parse_csv(void);
int test_split_on_unescaped_newlines(void);
Expand Down Expand Up @@ -81,9 +81,7 @@ int test_split_on_unescaped_newlines(void) {
}

int test_fread_csv_line(void) {
FILE *fp = fopen("test.csv", "r");

fp = fopen("test.csv", "r");
FILE *fp = fopen("tests/test.csv", "r");

if ( strcmp( fread_csv_line(fp, 1024, NULL), "foo,bar,baz" ) ) {
return 0;
Expand Down
File renamed without changes.

0 comments on commit 5f9a412

Please sign in to comment.