mbox series

[v2,0/4] t4113: modernize test style

Message ID 20230202171821.10508-1-cheskaqiqi@gmail.com (mailing list archive)
Headers show
Series t4113: modernize test style | expand

Message

Shuqi Liang Feb. 2, 2023, 5:18 p.m. UTC
Modernize the test script t4113.

Comparing to v1:

1.Test scripts in file in this script are written in old style,
     where the test_expect_success command and test title are written on
     separate lines.Change the old style '\'  to new style "'".
for example :
-test_expect_success setup \
-    'git update-index --add file'
-
+test_expect_success setup '
+    git update-index --add file
+'    

2.Files "test-patch" and "file" are created twice.
put the second creation of the files to its own step
'setup for apply at the beginning'

3.This script still use the old style "<<".
Change  "<<-" instead of "<<"
for exmaple:
-	cat >test-patch <<\EOF
+	cat >test-patch <<-\EOF

4.The test bodies in this script are written in old style .which indented with space, but not TAB.replace indentation spaces with tabs.
for example :

 test_expect_success setup '
-    git update-index --add file
+	git update-index --add file
 '

Shuqi Liang (4):
  t/t4113-apply-ending.sh: Modernize a test script
  Test scripts in file t4113-apply-ending.sh, files "test-patch" and
    "file" are created twice.
  use "<<-" instead of "<<"
  t4113-apply-ending.sh used 4-column indent with space,fix it in use
    tabs for indentation.

 t/t4113-apply-ending.sh | 51 +++++++++++++++++++++--------------------
 1 file changed, 26 insertions(+), 25 deletions(-)

Range-diff against v1:
1:  d7d52f1f79 = 1:  d7d52f1f79 t/t4113-apply-ending.sh: Modernize a test script
-:  ---------- > 2:  d9e5a54e32 Test scripts in file t4113-apply-ending.sh, files "test-patch" and "file" are created twice.
-:  ---------- > 3:  01a5c3285e use "<<-" instead of "<<"
-:  ---------- > 4:  cf2b2ca5a0 t4113-apply-ending.sh used 4-column indent with space,fix it in use tabs for indentation.