| 1 | // On Darwin, the man page states that "both fputs() and puts() print `(null)' |
|---|---|
| 2 | // if str is NULL." |
| 3 | // |
| 4 | // RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s |
| 5 | // CHECK: {{^\(null\)---\(null\)$}} |
| 6 | |
| 7 | #include <assert.h> |
| 8 | #include <stdio.h> |
| 9 | |
| 10 | int main(void) { |
| 11 | assert(fputs(NULL, stdout) >= 0); |
| 12 | fputs(s: "---", stdout); |
| 13 | assert(puts(NULL) >= 0); |
| 14 | |
| 15 | return 0; |
| 16 | } |
| 17 |
