2
0

realpath.c 439 B

12345678910111213141516171819
  1. #include <errno.h>
  2. #include <limits.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include "test_helpers.h"
  7. int main(void) {
  8. char *path_res = realpath("stdlib/realpath.c", NULL);
  9. ERROR_IF(realpath, path_res, == NULL);
  10. puts(path_res);
  11. free(path_res);
  12. char path_arg[PATH_MAX] = { 0 };
  13. char *res = realpath("stdlib/realpath.c", path_arg);
  14. ERROR_IF(realpath, res, == NULL);
  15. puts(path_arg);
  16. }