[clang][deps] Attempt to fix test on Windows
authorJan Svoboda <jan_svoboda@apple.com>
Wed, 16 Mar 2022 12:36:14 +0000 (13:36 +0100)
committerJan Svoboda <jan_svoboda@apple.com>
Wed, 16 Mar 2022 12:36:32 +0000 (13:36 +0100)
This test fails on Windows due to path separators

clang/test/ClangScanDeps/header-search-pruning-transitive.c

index 434f7e5..5e6e02b 100644 (file)
@@ -54,13 +54,11 @@ module X { header "X.h" }
 // RUN: sed -e "s|DIR|%/t|g" %t/cdb_with_a.json.template    > %t/cdb_with_a.json
 // RUN: sed -e "s|DIR|%/t|g" %t/cdb_without_a.json.template > %t/cdb_without_a.json
 
-// RUN: echo -%t > %t/results.json
-// RUN: clang-scan-deps -compilation-database %t/cdb_with_a.json    -format experimental-full -optimize-args >> %t/results.json
+// RUN: clang-scan-deps -compilation-database %t/cdb_with_a.json    -format experimental-full -optimize-args >  %t/results.json
 // RUN: clang-scan-deps -compilation-database %t/cdb_without_a.json -format experimental-full -optimize-args >> %t/results.json
-// RUN: cat %t/results.json | sed 's/\\/\//g' | FileCheck %s
+// RUN: cat %t/results.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t
 
-// CHECK:      -[[PREFIX:.*]]
-// CHECK-NEXT: {
+// CHECK:      {
 // CHECK-NEXT:   "modules": [
 // CHECK-NEXT:     {
 // CHECK-NEXT:       "clang-module-deps": [