Add smoke test for timezone loading (#114)

This commit is contained in:
Justine Tunney 2021-03-08 11:42:53 -08:00
parent 33e8fc8687
commit 0a61fe4ea0
12 changed files with 45 additions and 33 deletions

View file

@ -12,7 +12,7 @@
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/gc.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
@ -73,7 +73,7 @@ void GetOpts(int argc, char *argv[]) {
int cp(const char *src, const char *dst) {
if (endswith(dst, "/") || isdirectory(dst)) {
dst = gc(xasprintf("%s/%s", dst, basename));
dst = _gc(xasprintf("%s/%s", dst, basename));
}
if (!force && access(dst, W_OK) == -1 && errno != ENOENT) goto OnFail;
if (copyfile(src, dst, flags) == -1) goto OnFail;