Patchwork [4,of,5] byteify-strings: demonstrate an issue with multi-line parenthesis alignment

login
register
mail settings
Submitter Raphaël Gomès
Date Aug. 2, 2019, 3:01 p.m.
Message ID <1ae95b109c557785f566.1564758085@alphare-carbon.lan>
Download mbox | patch
Permalink /patch/41131/
State Accepted
Headers show

Comments

Raphaël Gomès - Aug. 2, 2019, 3:01 p.m.
# HG changeset patch
# User Raphaël Gomès <rgomes@octobus.net>
# Date 1564757842 -7200
#      Fri Aug 02 16:57:22 2019 +0200
# Node ID 1ae95b109c557785f566d307c13ded3eedc73dd9
# Parent  91a17ea759c5f0fceaae18fb558435ab379faac7
# EXP-Topic byteify-strings
byteify-strings: demonstrate an issue with multi-line parenthesis alignment

Patch

diff -r 91a17ea759c5 -r 1ae95b109c55 tests/test-byteify-strings.t
--- a/tests/test-byteify-strings.t	Fri Aug 02 16:54:02 2019 +0200
+++ b/tests/test-byteify-strings.t	Fri Aug 02 16:57:22 2019 +0200
@@ -193,3 +193,29 @@ 
   $ python $BINDIR/contrib/byteify-strings.py testfile.py
   obj[b'test'] = b"1234"
   obj[r'test'] = u"1234"
+
+Test preserve alignment
+
+  $ cat > testfile.py <<EOF
+  > @test(
+  >     'test',
+  >     [
+  >         ('a', 'b'),
+  >         ('a', 'b'),
+  >         {
+  >             'aslkdjf',
+  >         }
+  >     ]
+  > )
+  > EOF
+  $ python $BINDIR/contrib/byteify-strings.py testfile.py
+  @test(
+      b'test',
+      [
+          (b'a', b'b'),
+          (b'a', b'b'),
+          {
+              b'aslkdjf',
+           }
+       ]
+  )