{"thread":{"id":"5937","subject":"cogito-0.16: t/test-lib.sh: Unportable test(1) construct","startedAt":"2006-10-16T01:05:20Z","lastAt":"2006-10-16T01:47:57Z","messageCount":2,"participants":["Thomas Klausner","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28826","messageId":"20061016010520.GS25390@danbala.tuwien.ac.at","threadId":"5937","inReplyTo":null,"subject":"cogito-0.16: t/test-lib.sh: Unportable test(1) construct","fromName":"Thomas Klausner","fromEmail":"tk@giga.or.at","sentAt":"2006-10-16T01:05:20Z","receivedAt":"2006-10-16T01:05:20Z","isPatch":false,"sender":{"key":"tk@giga.or.at","avatar":null},"body":"Hi!\n\nAs of version 0.16, cogito is using an unportable bash extension\n\"==\" for test(1) in t/test-lib.sh. This is not supported by most\nother shells or even test(1) from GNU coreutils. Please use \"=\"\ninstead. A patch is attached.\n\nThanks,\n Thomas\n\n\n$NetBSD: patch-aa,v 1.1 2006/10/16 00:44:15 wiz Exp $\n\n--- t/test-lib.sh.orig\t2005-11-27 16:26:16.000000000 +0000\n+++ t/test-lib.sh\n@@ -87,16 +87,16 @@ test_failure_ () {\n \tsay \"FAIL $test_count: $1\"\n \tshift\n \techo \"$@\" | sed -e 's/^/\t/'\n-\ttest \"$immediate\" == \"\" || exit 1\n+\ttest \"$immediate\" = \"\" || exit 1\n }\n \n \n test_debug () {\n-\ttest \"$debug\" == \"\" || eval \"$1\"\n+\ttest \"$debug\" = \"\" || eval \"$1\"\n }\n \n test_expect_failure () {\n-\ttest \"$#\" == 2 ||\n+\ttest \"$#\" = 2 ||\n \terror \"bug in the test script: not 2 parameters to test-expect-failure\"\n \tsay >&3 \"expecting failure: $2\"\n \tif eval >&3 2>&4 \"$2\"\n@@ -108,7 +108,7 @@ test_expect_failure () {\n }\n \n test_expect_success () {\n-\ttest \"$#\" == 2 ||\n+\ttest \"$#\" = 2 ||\n \terror \"bug in the test script: not 2 parameters to test-expect-success\"\n \tsay >&3 \"expecting success: $2\"\n \tif eval >&3 2>&4 \"$2\"\n"},{"id":"28827","messageId":"20061016014757.GY20017@pasky.or.cz","threadId":"5937","inReplyTo":"20061016010520.GS25390@danbala.tuwien.ac.at","subject":"Re: cogito-0.16: t/test-lib.sh: Unportable test(1) construct","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-16T01:47:57Z","receivedAt":"2006-10-16T01:47:57Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nDear diary, on Mon, Oct 16, 2006 at 03:05:20AM CEST, I got a letter\nwhere Thomas Klausner <tk@giga.or.at> said that...\n> As of version 0.16, cogito is using an unportable bash extension\n> \"==\" for test(1) in t/test-lib.sh. This is not supported by most\n> other shells or even test(1) from GNU coreutils. Please use \"=\"\n> instead. A patch is attached.\n\n  thanks, applied. Please generate -p1 patches in the future and sign\nthem off.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"}]}