{"thread":{"id":"10784","subject":"[PATCH] test-lib.sh: move error line after error() declaration","startedAt":"2007-11-10T14:17:25Z","lastAt":"2007-11-10T14:17:25Z","messageCount":1,"participants":["Michele Ballabio"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"59217","messageId":"200711101517.25322.barra_cuda@katamail.com","threadId":"10784","inReplyTo":null,"subject":"[PATCH] test-lib.sh: move error line after error() declaration","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2007-11-10T14:17:25Z","receivedAt":"2007-11-10T14:17:25Z","isPatch":true,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"This patch removes a spurious \"command not found\" error\nand actually makes the \"Test script did not set test_description.\"\nstring follow the command line option \"--no-color\".\n\nSigned-off-by: Michele Ballabio <barra_cuda@katamail.com>\n---\n\nThis is for the master branch.\n\n t/test-lib.sh |   15 ++++++++++-----\n 1 files changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 603a8cd..90b6844 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -66,9 +66,6 @@ esac\n \ttput sgr0 >/dev/null 2>&1 &&\n \tcolor=t\n \n-test \"${test_description}\" != \"\" ||\n-error \"Test script did not set test_description.\"\n-\n while test \"$#\" -ne 0\n do\n \tcase \"$1\" in\n@@ -77,8 +74,7 @@ do\n \t-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)\n \t\timmediate=t; shift ;;\n \t-h|--h|--he|--hel|--help)\n-\t\techo \"$test_description\"\n-\t\texit 0 ;;\n+\t\thelp=t; shift ;;\n \t-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)\n \t\tverbose=t; shift ;;\n \t-q|--q|--qu|--qui|--quie|--quiet)\n@@ -124,6 +120,15 @@ say () {\n \tsay_color info \"$*\"\n }\n \n+test \"${test_description}\" != \"\" ||\n+error \"Test script did not set test_description.\"\n+\n+if test \"$help\" = \"t\"\n+then\n+\techo \"$test_description\"\n+\texit 0\n+fi\n+\n exec 5>&1\n if test \"$verbose\" = \"t\"\n then\n-- \n1.5.3.5\n"}]}