changeset 5851:0c896e79d9aa stable

tests: simplify character sorting script Since `greo -o .` doesn't catch line breaks, we can use simple echo instead of printf (or echo -n that was there even before that). Holding the result in a file is also not necessary, not sure why it was done this way.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 15 Mar 2021 18:45:18 +0800
parents b2d4cc5dff79
children f4b762cf41c0
files tests/test-discovery-obshashrange-cache.t
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-discovery-obshashrange-cache.t	Sun Mar 14 16:56:16 2021 +0800
+++ b/tests/test-discovery-obshashrange-cache.t	Mon Mar 15 18:45:18 2021 +0800
@@ -26,9 +26,7 @@
   $ hg -R main debugbuilddag '.+7'
 
   $ for node in `hg -R main log -T '{node}\n'`; do
-  >     printf $node | grep -o . | sort |tr -d "\n" > ancfile
-  >     anc=`cat ancfile`
-  >     rm ancfile
+  >     anc=`echo $node | grep -o . | sort | tr -d "\n"`
   >     echo "marking $anc as predecessors of $node"
   >     hg -R main debugobsolete $anc $node
   > done