diff options
author | Elliott Hughes <enh@google.com> | 2021-03-09 16:15:37 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-03-09 16:15:37 +0000 |
commit | ac3fcc6b8c645d26ba94026397ec53aa773e636b (patch) | |
tree | e65905128f2ab1457e8336ae47b17e357eb20eae /tests/stdlib_test.cpp | |
parent | ea8b224d7f421cfabe097492eb52f8fb51acaea6 (diff) | |
parent | bbbe27ff6e0ca301fb50012705eee8c8e380f929 (diff) |
Merge "Improve system() coverage."
Diffstat (limited to 'tests/stdlib_test.cpp')
-rw-r--r-- | tests/stdlib_test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp index bb1fd7ce5..90ef8619f 100644 --- a/tests/stdlib_test.cpp +++ b/tests/stdlib_test.cpp @@ -489,6 +489,12 @@ TEST(stdlib, system) { ASSERT_EQ(1, WEXITSTATUS(status)); } +TEST(stdlib, system_NULL) { + // "The system() function shall always return non-zero when command is NULL." + // http://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html + ASSERT_NE(0, system(nullptr)); +} + TEST(stdlib, atof) { ASSERT_DOUBLE_EQ(1.23, atof("1.23")); } |