tests/test-paths.t
changeset 34538 ac38e889b33a
parent 34537 8c3dd5e462cc
child 34539 f30e59703d98
--- a/tests/test-paths.t	Mon Sep 18 23:49:05 2017 +0900
+++ b/tests/test-paths.t	Mon Sep 18 23:31:01 2017 +0900
@@ -93,34 +93,25 @@
   $ hg log -rnull -T '{join(peerpaths, "\n")}\n'
   dupe=$TESTTMP/b#tip (glob)
   expand=$TESTTMP/a/$SOMETHING/bar (glob)
-  $ hg log -rnull -T '{peerpaths % "{name}: {path}\n"}'
+  $ hg log -rnull -T '{peerpaths % "{name}: {url}\n"}'
   dupe: $TESTTMP/b#tip (glob)
   expand: $TESTTMP/a/$SOMETHING/bar (glob)
   $ hg log -rnull -T '{get(peerpaths, "dupe")}\n'
   $TESTTMP/b#tip (glob)
 
- (but a path is actually a dict of url and sub-options)
+ (sub options can be populated by map/dot operation)
 
-  $ hg log -rnull -T '{join(get(peerpaths, "dupe"), "\n")}\n'
-  url=$TESTTMP/b#tip (glob)
-  pushurl=https://example.com/dupe
-  $ hg log -rnull -T '{get(peerpaths, "dupe") % "{key}: {value}\n"}'
+  $ hg log -rnull \
+  > -T '{get(peerpaths, "dupe") % "url: {url}\npushurl: {pushurl}\n"}'
   url: $TESTTMP/b#tip (glob)
   pushurl: https://example.com/dupe
-  $ hg log -rnull -T '{get(get(peerpaths, "dupe"), "pushurl")}\n'
+  $ hg log -rnull -T '{peerpaths.dupe.pushurl}\n'
   https://example.com/dupe
 
- (so there's weird behavior)
-
-  $ hg log -rnull -T '{get(peerpaths, "dupe")|count}\n'
-  2
-  $ hg log -rnull -T '{get(peerpaths, "dupe")|stringify|count}\n'
-  [0-9]{2,} (re)
-
- (in JSON, it's a dict of dicts)
+ (in JSON, it's a dict of urls)
 
   $ hg log -rnull -T '{peerpaths|json}\n' | sed 's|\\\\|/|g'
-  {"dupe": {"pushurl": "https://example.com/dupe", "url": "$TESTTMP/b#tip"}, "expand": {"url": "$TESTTMP/a/$SOMETHING/bar"}}
+  {"dupe": "$TESTTMP/b#tip", "expand": "$TESTTMP/a/$SOMETHING/bar"}
 
 password should be masked in plain output, but not in machine-readable/template
 output: