automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: tests: change `sort|uniq` to `s


From: Mike Frysinger
Subject: [automake-commit] branch master updated: tests: change `sort|uniq` to `sort -u`
Date: Fri, 13 Jan 2023 19:06:52 -0500

This is an automated email from the git hooks/post-receive script.

vapier pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=34c5008d7aa24cf7cd201e4ee4cca748a81d5730

The following commit(s) were added to refs/heads/master by this push:
     new 34c5008d7 tests: change `sort|uniq` to `sort -u`
34c5008d7 is described below

commit 34c5008d7aa24cf7cd201e4ee4cca748a81d5730
Author: Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Jan 3 22:38:22 2023 -0500

    tests: change `sort|uniq` to `sort -u`
    
    These are equivalent, but more performant.  We already use `sort -u`
    elsewhere in the codebase, so nothing new here really.
    
    * t/add-missing.tap: Change `sort|uniq` to `sort -u`.
    * t/CheckListOfTests.am: Likewise.
---
 t/CheckListOfTests.am | 2 +-
 t/add-missing.tap     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/CheckListOfTests.am b/t/CheckListOfTests.am
index e17083a62..672af700e 100644
--- a/t/CheckListOfTests.am
+++ b/t/CheckListOfTests.am
@@ -49,7 +49,7 @@ maintainer-check-list-of-tests:
               ($(am__cd) $(srcdir) && ls $$dir/*$$ext 2>/dev/null); \
             fi; \
           done; \
-        done | sed 's,^\./,,' | sort | uniq >$(am__tfs); \
+        done | sed 's,^\./,,' | sort -u >$(am__tfs); \
 ## Compare the two lists, complain if they differ.
         if $$diff $(am__tmk) $(am__tfs) >$(am__tdf); then \
            result=0; \
diff --git a/t/add-missing.tap b/t/add-missing.tap
index 010c03ec5..ea42bc9cd 100644
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -196,7 +196,7 @@ check_ ()
     # Only the expected files should be installed.  But automake always
     # require 'missing' and 'install-sh', so account for them.
     all_files="install-sh missing $files"
-    for f in $all_files; do echo $f; done | sort | uniq > files.exp
+    for f in $all_files; do echo $f; done | sort -u > files.exp
     (cd $build_aux && ls) | sort > files.got
     cat files.exp
     cat files.got



reply via email to

[Prev in Thread] Current Thread [Next in Thread]