Fix test clang-diff-json.cpp
authorAaron Smith <aaron.smith@microsoft.com>
Sat, 10 Feb 2018 21:28:55 +0000 (21:28 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Sat, 10 Feb 2018 21:28:55 +0000 (21:28 +0000)
Summary:
This test would fail if the python path had spaces. Add a quote around the path to fix this problem and update some test values changed by the addition of quotes around the path.

Tested on Windows and Linux with Python 3.x

Reviewers: zturner, llvm-commits

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43164

llvm-svn: 324824

clang/test/Tooling/clang-diff-json.cpp

index 9aac6fa..20c808c 100644 (file)
@@ -1,10 +1,10 @@
 // RUN: clang-diff -ast-dump-json %s -- \
-// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
+// RUN: | '%python' -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
 // RUN: | FileCheck %s
 
-// CHECK: "begin": 299,
+// CHECK: "begin": 301,
 // CHECK: "type": "FieldDecl",
-// CHECK: "end": 319,
+// CHECK: "end": 321,
 // CHECK: "type": "CXXRecordDecl",
 class A {
   int x;