From 762ff2fcaf45d6b94fb580e168baf3f01ebd61e1 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 1 Nov 2019 17:21:52 +0100 Subject: Added README.md and .gitignore --- .gitignore | 4 ++++ README.md | 17 +++++++++++++++++ a.out | Bin 33288 -> 0 bytes a.tmp | 31 ------------------------------- ft_printf_test | Bin 33704 -> 0 bytes helper.o | Bin 2088 -> 0 bytes main.o | Bin 4784 -> 0 bytes moulitest_read_stdout.o | Bin 2400 -> 0 bytes 8 files changed, 21 insertions(+), 31 deletions(-) create mode 100644 .gitignore create mode 100644 README.md delete mode 100755 a.out delete mode 100644 a.tmp delete mode 100755 ft_printf_test delete mode 100644 helper.o delete mode 100644 main.o delete mode 100644 moulitest_read_stdout.o diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a19436 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +a.out +ft_printf_test +*.o +*.ghc diff --git a/README.md b/README.md new file mode 100644 index 0000000..a6e7397 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# ft_printf test + +Unit test for the ft_printf project of 42 school. + +## Usage + +Clone this repo such that: + +``` +` +|- ft_printf_test/ +|- ft_printf/ +``` + +or modify the `FT_PRINTF_PATH` variable in the Makefile + +`> make run` diff --git a/a.out b/a.out deleted file mode 100755 index fcf0f5c..0000000 Binary files a/a.out and /dev/null differ diff --git a/a.tmp b/a.tmp deleted file mode 100644 index ae0e529..0000000 --- a/a.tmp +++ /dev/null @@ -1,31 +0,0 @@ -do { - capture_stdout(); - do { - if ((pid = fork()) < 0) - exit(1); - if (pid == 0) { - do { - origin_ret = printf("%d", 10); - origin_buf = strdup(capture_stdout_get_buf()); - } while(0); - exit(0); - } - wait(&pid); - signaled = (((*(int *)&(pid)) & 0177) != 0177 && ((*(int *)&(pid)) & 0177) != 0); - } while(0);; - origin_signaled = signaled; - do { - if ((pid = fork()) < 0) - exit(1); - if (pid == 0) { - do { - user_ret = ft_printf("%d", 10); - user_buf = strdup(capture_stdout_get_buf()); - } while(0); - exit(0); - } wait(&pid); - signaled = (((*(int *)&(pid)) & 0177) != 0177 && ((*(int *)&(pid)) & 0177) != 0); - } while(0);; - capture_stdout_destroy(); - user_signaled = signaled; -} while (0);; diff --git a/ft_printf_test b/ft_printf_test deleted file mode 100755 index f970eee..0000000 Binary files a/ft_printf_test and /dev/null differ diff --git a/helper.o b/helper.o deleted file mode 100644 index a070f30..0000000 Binary files a/helper.o and /dev/null differ diff --git a/main.o b/main.o deleted file mode 100644 index 7c8d033..0000000 Binary files a/main.o and /dev/null differ diff --git a/moulitest_read_stdout.o b/moulitest_read_stdout.o deleted file mode 100644 index f206a20..0000000 Binary files a/moulitest_read_stdout.o and /dev/null differ -- cgit