diff options
author | James Henderson <jh7370@my.bristol.ac.uk> | 2019-08-12 11:36:11 +0000 |
---|---|---|
committer | James Henderson <jh7370@my.bristol.ac.uk> | 2019-08-12 11:36:11 +0000 |
commit | f23ce128fd614d5ed7b5c70038c5db8b257c5127 (patch) | |
tree | d3ab7548147936d4d4057564f569c0fc47426948 /llvm/test/tools/llvm-strings/file-filename.test | |
parent | ccdad6ef486a00ed815ead642d2f62d87d86ee90 (diff) | |
download | bcm5719-llvm-f23ce128fd614d5ed7b5c70038c5db8b257c5127.tar.gz bcm5719-llvm-f23ce128fd614d5ed7b5c70038c5db8b257c5127.zip |
[llvm-strings] Improve testing of llvm-strings
This patch tidies up the llvm-strings testing by:
1. Adding comments to every test.
2. Getting rid of canned input files, and having the tests generate
them on the fly (this makes the tests self-contained).
3. Adding missing test coverage.
4. Renaming some tests that weren't clear as to their purpose.
5. Adding extra checking of various cases, formatting etc.
6. Removing a test that didn't seem to have any useful purpose for
testing llvm-strings.
Reviewed by: rupprecht, grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D66015
llvm-svn: 368555
Diffstat (limited to 'llvm/test/tools/llvm-strings/file-filename.test')
-rw-r--r-- | llvm/test/tools/llvm-strings/file-filename.test | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/test/tools/llvm-strings/file-filename.test b/llvm/test/tools/llvm-strings/file-filename.test index 26f3b4d334f..7284970a4cf 100644 --- a/llvm/test/tools/llvm-strings/file-filename.test +++ b/llvm/test/tools/llvm-strings/file-filename.test @@ -1,3 +1,10 @@ -RUN: llvm-strings -f %S/Inputs/abcd | FileCheck %s -RUN: llvm-strings --print-file-name %S/Inputs/abcd | FileCheck %s --strict-whitespace -CHECK: {{[\\/]}}abcd: abcd +## Show that --print-file-name prints the name of the file before each line in +## the output. + +RUN: echo abcd > %t +RUN: echo efg >> %t +RUN: echo hijk >> %t +RUN: llvm-strings -f %t | FileCheck %s --strict-whitespace -DFILE=%t +RUN: llvm-strings --print-file-name %t | FileCheck %s --strict-whitespace -DFILE=%t +CHECK: [[FILE]]: abcd +CHECK-NEXT: [[FILE]]: hijk |