blob: 97f00d9b18a13586d294c3d16798cf80cee78cdc [file] [log] [blame]
Douglas Gregor33b3d2a2011-10-21 23:20:41 +00001// RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-PWD %s
2// CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}}
3
4// RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-FOO %s
5// CHECK-FOO: "-fdebug-compilation-dir" "/foo"
Nick Lewycky7c4fd912011-10-21 02:32:14 +00006
7// This test uses grep instead of FileCheck so that we get %S -> dirname
8// substitution.
9
10// "PWD=/foo gcc" wouldn't necessarily work. You would need to pick a different
11// path to the same directory (try a symlink).