-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New fsio_join_paths, fsio_file_size and fsio_read_text_file_with_opti…
…ons functions
- Loading branch information
1 parent
30b144c
commit cba0a7e
Showing
32 changed files
with
794 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "fsio.h" | ||
#include "test.h" | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
|
||
void test_impl() | ||
{ | ||
bool done = fsio_copy_file(NULL, "./test.txt"); | ||
|
||
assert_true(!done); | ||
} | ||
|
||
|
||
int main() | ||
{ | ||
test_run(test_impl); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "fsio.h" | ||
#include "test.h" | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
|
||
void test_impl() | ||
{ | ||
char *file1 = "./copy_file_null_target.txt"; | ||
bool done = fsio_write_text_file(file1, "some\ncontent"); | ||
|
||
assert_true(done); | ||
|
||
done = fsio_copy_file(file1, NULL); | ||
assert_true(!done); | ||
|
||
remove(file1); | ||
} | ||
|
||
|
||
int main() | ||
{ | ||
test_run(test_impl); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "fsio.h" | ||
#include "test.h" | ||
#include <stdio.h> | ||
|
||
|
||
void test_impl() | ||
{ | ||
char *file = "./file_size_exists.txt"; | ||
bool done = fsio_write_text_file(file, "123456789"); | ||
|
||
assert_true(done); | ||
|
||
long size = fsio_file_size(file); | ||
|
||
remove(file); | ||
|
||
assert_num_equal(size, 9); | ||
} | ||
|
||
|
||
int main() | ||
{ | ||
test_run(test_impl); | ||
} | ||
|
Oops, something went wrong.