[clang] 09fc779 - [NFC][tests] Replace use of GNUisms in usage of diff

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 8 09:08:00 PST 2020


Author: Hubert Tong
Date: 2020-11-08T12:07:51-05:00
New Revision: 09fc7796e57417071523c82bdac8b3bf050648a0

URL: https://github.com/llvm/llvm-project/commit/09fc7796e57417071523c82bdac8b3bf050648a0
DIFF: https://github.com/llvm/llvm-project/commit/09fc7796e57417071523c82bdac8b3bf050648a0.diff

LOG: [NFC][tests] Replace use of GNUisms in usage of diff

... the POSIX options suffice.

This maintains compatibility with the system `diff` on platforms
like AIX.

Added: 
    

Modified: 
    clang/test/APINotes/yaml-roundtrip-2.test
    clang/test/APINotes/yaml-roundtrip.test

Removed: 
    


################################################################################
diff  --git a/clang/test/APINotes/yaml-roundtrip-2.test b/clang/test/APINotes/yaml-roundtrip-2.test
index 02455302fec1..b0b777b59506 100644
--- a/clang/test/APINotes/yaml-roundtrip-2.test
+++ b/clang/test/APINotes/yaml-roundtrip-2.test
@@ -1,8 +1,8 @@
 RUN: apinotes-test %S/Inputs/Frameworks/SimpleKit.framework/Headers/SimpleKit.apinotes > %t.result
-RUN: not 
diff  --strip-trailing-cr --ed %t.result %S/Inputs/Frameworks/SimpleKit.framework/Headers/SimpleKit.apinotes | FileCheck %s
+RUN: not 
diff  -b -e %t.result %S/Inputs/Frameworks/SimpleKit.framework/Headers/SimpleKit.apinotes | FileCheck %s
 
-The `--ed` parameter to `
diff ` is not implemented in the builtin 
diff , assume
-that we have a GNU compatible 
diff  when we have a shell.
+The `-e` option of `
diff ` is not implemented in the builtin 
diff , assume
+that we have a POSIX compatible 
diff  when we have a shell.
 REQUIRES: shell
 
 We expect only the document markers to be emitted

diff  --git a/clang/test/APINotes/yaml-roundtrip.test b/clang/test/APINotes/yaml-roundtrip.test
index bd4c89d2cdd9..bcf84afda8df 100644
--- a/clang/test/APINotes/yaml-roundtrip.test
+++ b/clang/test/APINotes/yaml-roundtrip.test
@@ -1,5 +1,5 @@
 RUN: apinotes-test %S/Inputs/Frameworks/Simple.framework/Headers/Simple.apinotes > %t.result
-RUN: not 
diff  --strip-trailing-cr %S/Inputs/Frameworks/Simple.framework/Headers/Simple.apinotes %t.result | FileCheck %s
+RUN: not 
diff  -b %S/Inputs/Frameworks/Simple.framework/Headers/Simple.apinotes %t.result | FileCheck %s
 
 Avoid Windows as the 
diff  output 
diff ers due to line-endings and 
diff erent 
diff 
 implementations.


        


More information about the cfe-commits mailing list