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