aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/builtin/driver.cxx1
-rw-r--r--tests/process-term/driver.cxx1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/builtin/driver.cxx b/tests/builtin/driver.cxx
index 843631a..bab74aa 100644
--- a/tests/builtin/driver.cxx
+++ b/tests/builtin/driver.cxx
@@ -90,6 +90,7 @@ main (int argc, char* argv[])
assert (!s.empty ());
char* e (nullptr);
+ errno = 0; // We must clear it according to POSIX.
uint64_t r (strtoull (s.c_str (), &e, 10)); // Can't throw.
assert (errno != ERANGE && e == s.c_str () + s.size ());
return r;
diff --git a/tests/process-term/driver.cxx b/tests/process-term/driver.cxx
index 8487bb7..835272f 100644
--- a/tests/process-term/driver.cxx
+++ b/tests/process-term/driver.cxx
@@ -98,6 +98,7 @@ main (int argc, const char* argv[])
assert (!s.empty ());
char* e (nullptr);
+ errno = 0; // We must clear it according to POSIX.
uint64_t r (strtoull (s.c_str (), &e, 10)); // Can't throw.
assert (errno != ERANGE && e == s.c_str () + s.size ());