Skip to content

Commit e08c435

Browse files
[clang][ExtractAPI][NFC] Fix sed delimiter in test
Fix path replacement in sed (properly this time) using lit regex_replacement. Differential Revision: https://reviews.llvm.org/D123526 Co-authored-by: Michele Scandale <[email protected]> Co-authored-by: Zixu Wang <[email protected]>
1 parent e90110e commit e08c435

15 files changed

+34
-34
lines changed

clang/test/ExtractAPI/enum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api -target arm64-apple-macosx \
66
// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/global_record.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=GlobalRecord -target arm64-apple-macosx \
66
// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/global_record_multifile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=GlobalRecord -target arm64-apple-macosx \
66
// RUN: %t/input1.h %t/input2.h %t/input3.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/known_files_only.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=GlobalRecord -target arm64-apple-macosx \
66
// RUN: %t/input1.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/known_files_only_hmap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
5-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/known_files_only.hmap.json.in >> \
6-
// RUN: %t/known_files_only.hmap.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
5+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
6+
// RUN: %t/known_files_only.hmap.json.in >> %t/known_files_only.hmap.json
77
// RUN: %hmaptool write %t/known_files_only.hmap.json %t/known_files_only.hmap
88
// RUN: %clang -extract-api --product-name=KnownFilesOnlyHmap -target arm64-apple-macosx \
99
// RUN: -I%t/known_files_only.hmap -I%t/subdir %t/subdir/subdir1/input.h \

clang/test/ExtractAPI/language.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/c.reference.output.json.in >> \
4-
// RUN: %t/c.reference.output.json
5-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/objc.reference.output.json.in >> \
6-
// RUN: %t/objc.reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/c.reference.output.json.in >> %t/c.reference.output.json
5+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
6+
// RUN: %t/objc.reference.output.json.in >> %t/objc.reference.output.json
77

88
// RUN: %clang -extract-api -x c-header -target arm64-apple-macosx \
99
// RUN: %t/c.h -o %t/c.output.json | FileCheck -allow-empty %s

clang/test/ExtractAPI/macro_undefined.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=Macros -target arm64-apple-macosx \
66
// RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/macros.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=Macros -target arm64-apple-macosx \
66
// RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/objc_category.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \
66
// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/objc_interface.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \
66
// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/objc_protocol.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \
66
// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/struct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api -target arm64-apple-macosx \
66
// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/typedef.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=Typedef -target arm64-apple-macosx \
66
// RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/typedef_anonymous_record.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=TypedefChain -target arm64-apple-macosx \
66
// RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

clang/test/ExtractAPI/typedef_chain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4-
// RUN: %t/reference.output.json
3+
// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4+
// RUN: %t/reference.output.json.in >> %t/reference.output.json
55
// RUN: %clang -extract-api --product-name=TypedefChain -target arm64-apple-macosx \
66
// RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s
77

0 commit comments

Comments
 (0)