Skip to contentSkip to conversation

Improve legibility of test_expect_code output

PATCH In review Adam Spiers 2 participants 9 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Improve legibility of test_expect_code output

---
 t/test-lib-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 t/test-lib-functions.sh
t/test-lib-functions.sh +1 -1
old mode 100644
new mode 100755
index 8889ba5..e022e73
@@ -562,7 +562,7 @@ test_expect_code () {
 		return 0
 	fi
 
-	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
+	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code from: $*"
 	return 1
 }
 
Signature · 1 line
1.7.12.147.g6d168f4
#1 lore raw
Quoted 1 line · Adam Spiers

---

No explanation why this is a good idea, nor sign-off?

Quoted 18 lines
 t/test-lib-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 t/test-lib-functions.sh
t/test-lib-functions.sh +1 -1
old mode 100644
new mode 100755
index 8889ba5..e022e73
@@ -562,7 +562,7 @@ test_expect_code () {
 		return 0
 	fi
 
-	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
+	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code from: $*"
 	return 1
 }
#2 lore raw
Quoted 5 lines · Junio C Hamano
Quoted 1 line · Adam Spiers

---

No explanation why this is a good idea, nor sign-off?

I realised I forgot the sign-off seconds after sending :-(

Isn't it completely self-explanatory? e.g.

test_expect_code: command exited with 0, we wanted 128 git foo bar

clearly makes more sense than

test_expect_code: command exited with 0, we wanted 128 from: git foo bar

#3 lore raw
Quoted 9 lines · Adam Spiers
Quoted 5 lines · Junio C Hamano
Quoted 1 line · Adam Spiers

---

No explanation why this is a good idea, nor sign-off?

I realised I forgot the sign-off seconds after sending :-(

Quoted 7 lines

Isn't it completely self-explanatory? e.g.

test_expect_code: command exited with 0, we wanted 128 git foo bar

clearly makes more sense than

test_expect_code: command exited with 0, we wanted 128 from: git foo bar

test_expect_code: command exited with 0, we wanted 128: git foo bar

would be shorter and equally legible, I would think.

In any case, the proposed commit log message should have explained these differences in the first place so that I or others do not have to ask.

Do you want this queued on top of your other series, or as an independent change?

#4 lore raw
Quoted 2 lines · Junio C Hamano

Do you want this queued on top of your other series, or as an independent change?

Independent please.

#5 lore raw
Quoted 5 lines · Adam Spiers
Quoted 2 lines · Junio C Hamano

Do you want this queued on top of your other series, or as an independent change?

Independent please.

With a sign-off?

#6 lore raw
Quoted 8 lines · Junio C Hamano
Quoted 5 lines · Adam Spiers
Quoted 2 lines · Junio C Hamano

Do you want this queued on top of your other series, or as an independent change?

Independent please.

With a sign-off?

Yep.

#7 lore raw
In reply to Adam Spiers
Quoted 9 lines · Adam Spiers
Quoted 5 lines · Junio C Hamano
Quoted 1 line · Adam Spiers

---

No explanation why this is a good idea, nor sign-off?

I realised I forgot the sign-off seconds after sending :-(

Quoted 7 lines

Isn't it completely self-explanatory? e.g.

test_expect_code: command exited with 0, we wanted 128 git foo bar

clearly makes more sense than

test_expect_code: command exited with 0, we wanted 128 from: git foo bar

If it were "..., we wanted 128 from 'git foo bar'", then I would, but otherwise, not really.

#8 lore raw
Quoted 2 lines · Junio C Hamano

If it were "..., we wanted 128 from 'git foo bar'", then I would, but otherwise, not really.

That's fine by me. Both are better than the status quo.