1 // RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
9 // use a tool that produces different output than input to verify
10 // that everything worked correctly
11 FILE *fp
= popen("sort", "w");
14 // verify that fileno() returns a meaningful descriptor (needed
15 // for the implementation of TSan)
16 assert(fileno(fp
) != -1);
18 assert(fputs("2\n", fp
) >= 0);
19 assert(fputs("1\n", fp
) >= 0);
20 assert(pclose(fp
) == 0);