| 1 | // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s |
|---|---|
| 2 | |
| 3 | // UNSUPPORTED: android |
| 4 | |
| 5 | #include <assert.h> |
| 6 | #include <errno.h> |
| 7 | #include <stdio.h> |
| 8 | #include <unistd.h> |
| 9 | |
| 10 | int main(void) { |
| 11 | printf(format: "getusershell\n"); |
| 12 | |
| 13 | setusershell(); |
| 14 | char *fentry = getusershell(); |
| 15 | |
| 16 | printf(format: "First entry: '%s'\n", fentry); |
| 17 | |
| 18 | endusershell(); |
| 19 | |
| 20 | return 0; |
| 21 | // CHECK: getusershell |
| 22 | // CHECK: First entry: '{{.*}}' |
| 23 | } |
| 24 |
