From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Fleury Subject: Re: [PATCH] ob-shell Date: Fri, 22 Aug 2014 10:52:38 +0200 Message-ID: References: <86vbsycepz.fsf@somewhere.org> <87tx8iks22.fsf@bzg.ath.cx> <86ppi6qnb5.fsf@somewhere.org> <87vbrxx4zr.fsf@Rainer.invalid> <86ppi5uwgl.fsf@somewhere.org> <877g4cacn9.fsf@Rainer.invalid> <87vbrt8hpo.fsf_-_@Rainer.invalid> <87ha3ck9as.fsf@gmail.com> <87bns0gho2.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=90e6ba6e89b867d38e050133f7e9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKkau-0003X1-36 for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 04:53:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKkas-0002I4-WA for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 04:53:12 -0400 Received: from mail-ig0-x236.google.com ([2607:f8b0:4001:c05::236]:47590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKkas-0002Hq-O6 for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 04:53:10 -0400 Received: by mail-ig0-f182.google.com with SMTP id c1so14172606igq.15 for ; Fri, 22 Aug 2014 01:53:09 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Schmitt Cc: Achim Gratz , emacs-org list --90e6ba6e89b867d38e050133f7e9 Content-Type: multipart/alternative; boundary=90e6ba6e89b867d38a050133f7e7 --90e6ba6e89b867d38a050133f7e7 Content-Type: text/plain; charset=UTF-8 Hello, I have a little patch (attached) that does check the version of bash, and uses associative arrays (or doesn't) depending on that version. The problem now is that the test suite will only work on one platform t a time, i.e. if there is a bash4 there, it will pass, but if it has bash3, it will work as intended, but return a different value set. Is there a way to have platform-dependent tests ? --Pascal On Wed, Aug 13, 2014 at 3:29 PM, Alan Schmitt < alan.schmitt@polytechnique.org> wrote: > On 2014-08-13 15:20, Pascal Fleury writes: > > > Yes, sorry for late reaction (it's holiday season here :-). > > Funny, it's holiday season here as well (in Bretagne) ;-) > > > This is an issue I introduced with the assoc. arrays, which does not > > verify if the installed version of bash handles them (from bash4 on). > > It needs a modification in the setup code that checks the version and > > only issues assoc. array code when bash supports it. And it so happens > > that Macs have bash3 installed. Will try to find such a machine and > > add the test. > > Thanks a lot. If I can help, please let me know. > > Best, > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > -- --paf --90e6ba6e89b867d38a050133f7e7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I have a little patch (attached)= that does check the version of bash, and uses associative arrays (or doesn= 't) depending on that version.

The problem now= is that the test suite will only work on one platform t a time, i.e. if th= ere is a bash4 there, it will pass, but if it has bash3, it will work as in= tended, but return a different value set. Is there a way to have platform-d= ependent tests ?

--Pascal



On Wed, Aug 13, 2014 at 3:29 PM, = Alan Schmitt <alan.schmitt@polytechnique.org> w= rote:
On 2014-08-13 15:20, Pascal = Fleury <fleury@google.com> w= rites:

> Yes, sorry for late reaction (it's holiday season here :-).

Funny, it's holiday season here as well (in Bretagne) ;-)

> This is an issue I introduced with the assoc. arrays, which does not > verify if the installed version of bash handles them (from bash4 on).<= br> > It needs a modification in the setup code that checks the version and<= br> > only issues assoc. array code when bash supports it. And it so happens=
> that Macs have bash3 installed. Will try to find such a machine and > add the test.

Thanks a lot. If I can help, please let me know.

Best,

Alan

--
OpenPGP Key ID : 040D0A3B4ED2E5C7



--
= --paf
--90e6ba6e89b867d38a050133f7e7-- --90e6ba6e89b867d38e050133f7e9 Content-Type: application/octet-stream; name="0001-ob-shell-now-checks-for-the-current-bash-version-bef.patch" Content-Disposition: attachment; filename="0001-ob-shell-now-checks-for-the-current-bash-version-bef.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hz5a595i1 RnJvbSBkMjhkODJkZDg4ZDJlNjFhMmNlMDhjYzY5ZWVlMDJiODIxM2M2MjUyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQYXNjYWwgRmxldXJ5IDxmbGV1cnlAZ29vZ2xlLmNvbT4KRGF0 ZTogRnJpLCAyMiBBdWcgMjAxNCAxMDo0NToyMCArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIG9iLXNo ZWxsIG5vdyBjaGVja3MgZm9yIHRoZSBjdXJyZW50IGJhc2ggdmVyc2lvbiBiZWZvcmUKIGVtaXR0 aW5nIGNvZGUgdGhhdCB1c2VzIGFzc29jaWF0aXZlIGFycmF5cywgYmVjYXVzZSBiYXNoIHN1cHBv cnRzIHRoZW0gb25seQogZnJvbSB2ZXJzaW9uIDQgYW5kIG9uLCBhbmQgb24gc29tZSBwbGF0Zm9y bXMgKGUuZy4gTWFjT1NYKSB0aGUgZGVmYXVsdCBiYXNoCiBpcyB2My4KCi0tLQogbGlzcC9vYi1z aGVsbC5lbCB8IDkgKysrKysrKy0tCiAxIGZpbGUgY2hhbmdlZCwgNyBpbnNlcnRpb25zKCspLCAy IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3Avb2Itc2hlbGwuZWwgYi9saXNwL29iLXNo ZWxsLmVsCmluZGV4IDhjNThkZmQuLjI3ZDZkZTcgMTAwNjQ0Ci0tLSBhL2xpc3Avb2Itc2hlbGwu ZWwKKysrIGIvbGlzcC9vYi1zaGVsbC5lbApAQCAtMTIxLDEwICsxMjEsMTUgQEAgVGhpcyBmdW5j dGlvbiBpcyBjYWxsZWQgYnkgYG9yZy1iYWJlbC1leGVjdXRlLXNyYy1ibG9jaycuIgogICA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