aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/qutil.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-12-29 16:36:15 +0100
committerJay Berkenbilt <ejb@ql.org>2021-12-29 19:41:02 +0100
commitaf91b5b5841aaa34ebf2d2062041c874425f474f (patch)
treee8d34f402e67cf532fbfa775c4be31e68366b77c /libtests/qutil.cc
parentac0060ac38ecf4fa380f49fd1e40ebaabb479596 (diff)
downloadqpdf-af91b5b5841aaa34ebf2d2062041c874425f474f.tar.zst
Add QUtil::file_can_be_opened
Diffstat (limited to 'libtests/qutil.cc')
-rw-r--r--libtests/qutil.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libtests/qutil.cc b/libtests/qutil.cc
index f52ec2dc..46eb840c 100644
--- a/libtests/qutil.cc
+++ b/libtests/qutil.cc
@@ -203,6 +203,9 @@ void fopen_wrapper_test()
std::cout << "exception: " << s.what() << std::endl;
assert(s.getErrno() != 0);
}
+
+ assert(QUtil::file_can_be_opened("qutil.out"));
+ assert(! QUtil::file_can_be_opened("/does/not/exist"));
}
void getenv_test()