From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Fleury Subject: Re: [PATCH] ob-shell Date: Wed, 13 Aug 2014 15:20:49 +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/alternative; boundary=bcaec51d2a34ea4219050082a9ca Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHYUU-0006q7-EQ for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 09:21:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHYUS-00012P-Qv for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 09:21:22 -0400 Received: from mail-ig0-x232.google.com ([2607:f8b0:4001:c05::232]:51756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHYUS-00012K-JQ for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 09:21:20 -0400 Received: by mail-ig0-f178.google.com with SMTP id uq10so1647461igb.5 for ; Wed, 13 Aug 2014 06:21:20 -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 --bcaec51d2a34ea4219050082a9ca Content-Type: text/plain; charset=UTF-8 Yes, sorry for late reaction (it's holiday season here :-). 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. --paf On Wed, Aug 13, 2014 at 3:12 PM, Alan Schmitt < alan.schmitt@polytechnique.org> wrote: > On 2014-08-04 21:48, Achim Gratz writes: > > > Alan Schmitt writes: > >> Has this been applied? I'm still seeing a failing test for ob-shell. > >> > >> 1 unexpected results: > >> FAILED ob-shell/bash-uses-assoc-arrays > > > > That's to be expected if you use a version of bash that doesn't support > > assoc arrays. > > I don't use bash, I either use zsh or fish. So I guess the version of > bash on my system is the one that ships with OS X 10.9: > > GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) > > > WHat is the backtrace from the test? Babel (and the > > tests) blindly assume that these things work when they see you using > > "bash". > > Test ob-shell/bash-uses-assoc-arrays backtrace: > signal(ert-test-failed (((should (equal "20 cm" (org-babel-execute-s > ert-fail(((should (equal "20 cm" (org-babel-execute-src-block))) :fo > (if (unwind-protect (setq value-1098 (apply fn-1096 args-1097)) (set > (let (form-description-1100) (if (unwind-protect (setq value-1098 (a > (let ((value-1098 (quote ert-form-evaluation-aborted-1099))) (let (f > (let ((fn-1096 (function equal)) (args-1097 (list "20 cm" (org-babel > (save-restriction (org-babel-next-src-block 2) (let ((fn-1096 (funct > (progn (org-id-goto "82320a48-3409-49d7-85c9-5de1c6d3ff87") (setq to > (unwind-protect (progn (org-id-goto "82320a48-3409-49d7-85c9-5de1c6d > (let ((save-match-data-internal (match-data))) (unwind-protect (prog > (progn (let ((save-match-data-internal (match-data))) (unwind-protec > (unwind-protect (progn (let ((save-match-data-internal (match-data)) > (let ((wconfig (current-window-configuration))) (unwind-protect (pro > (unwind-protect (let ((wconfig (current-window-configuration))) (unw > (let* ((id-location (org-id-find "82320a48-3409-49d7-85c9-5de1c6d3ff > (lambda nil (let* ((id-location (org-id-find "82320a48-3409-49d7-85c > byte-code("\306\307!q\210\310\216\311 \312\216\313\314\315\316\3 > ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc > byte-code("\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\3 > ert-run-test([cl-struct-ert-test ob-shell/bash-uses-assoc-arrays "Ba > ert-run-or-rerun-test([cl-struct-ert--stats "\\(org\\|ob\\)" [[cl-st > ert-run-tests("\\(org\\|ob\\)" #[(event-type &rest event-args) "\306 > ert-run-tests-batch("\\(org\\|ob\\)") > ert-run-tests-batch-and-exit("\\(org\\|ob\\)") > (let ((org-id-track-globally t) (org-test-selector (if org-test-sele > org-test-run-batch-tests("\\(org\\|ob\\)") > eval((org-test-run-batch-tests org-test-select-re)) > command-line-1(("--eval" "(setq vc-handled-backends nil org-startup- > command-line() > normal-top-level() > Test ob-shell/bash-uses-assoc-arrays condition: > (ert-test-failed > ((should > (equal "20 cm" > (org-babel-execute-src-block))) > :form > (equal "20 cm" "50 dl") > :value nil :explanation > (array-elt 0 > (different-atoms > (50 "#x32" "?2") > (53 "#x35" "?5"))))) > FAILED 104/510 ob-shell/bash-uses-assoc-arrays > > Thanks, > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > -- --paf --bcaec51d2a34ea4219050082a9ca Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, sorry for late reaction (it's holiday season here= :-).

This is an issue I introduced with the assoc. arra= ys, which does not verify if the installed version of bash handles them (fr= om 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 tes= t.

--paf


On Wed, Aug 13, 2014 at 3:12 PM, Alan Schmitt <alan.schmitt@polytechnique.org> wrote:
On 2014-08-04 21:48, Achim G= ratz <Stromeko@nexgo.de> wri= tes:

> Alan Schmitt writes:
>> Has this been applied? I'm still seeing a failing test for ob-= shell.
>>
>> 1 unexpected results:
>>=C2=A0 =C2=A0 FAILED=C2=A0 ob-shell/bash-uses-assoc-arrays
>
> That's to be expected if you use a version of bash that doesn'= t support
> assoc arrays.

I don't use bash, I either use zsh or fish. So I guess the versio= n of
bash on my system is the one that ships with OS X 10.9:

GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)

> WHat is the backtrace from the test?=C2=A0 Babel (and the
> tests) blindly assume that these things work when they see you using > "bash".

Test ob-shell/bash-uses-assoc-arrays backtrace:
=C2=A0 signal(ert-test-failed (((should (equal "20 cm" (org-babel= -execute-s
=C2=A0 ert-fail(((should (equal "20 cm" (org-babel-execute-src-bl= ock))) :fo
=C2=A0 (if (unwind-protect (setq value-1098 (apply fn-1096 args-1097)) (set=
=C2=A0 (let (form-description-1100) (if (unwind-protect (setq value-1098 (a=
=C2=A0 (let ((value-1098 (quote ert-form-evaluation-aborted-1099))) (let (f=
=C2=A0 (let ((fn-1096 (function equal)) (args-1097 (list "20 cm" = (org-babel
=C2=A0 (save-restriction (org-babel-next-src-block 2) (let ((fn-1096 (funct=
=C2=A0 (progn (org-id-goto "82320a48-3409-49d7-85c9-5de1c6d3ff87"= ) (setq to
=C2=A0 (unwind-protect (progn (org-id-goto "82320a48-3409-49d7-85c9-5d= e1c6d
=C2=A0 (let ((save-match-data-internal (match-data))) (unwind-protect (prog=
=C2=A0 (progn (let ((save-match-data-internal (match-data))) (unwind-protec=
=C2=A0 (unwind-protect (progn (let ((save-match-data-internal (match-data))=
=C2=A0 (let ((wconfig (current-window-configuration))) (unwind-protect (pro=
=C2=A0 (unwind-protect (let ((wconfig (current-window-configuration))) (unw=
=C2=A0 (let* ((id-location (org-id-find "82320a48-3409-49d7-85c9-5de1c= 6d3ff
=C2=A0 (lambda nil (let* ((id-location (org-id-find "82320a48-3409-49d= 7-85c
=C2=A0 byte-code("\306\307!q\210\310\216\311 \312\216\313\314\315\316\= 3
=C2=A0 ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc=
=C2=A0 byte-code("\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210= )\3
=C2=A0 ert-run-test([cl-struct-ert-test ob-shell/bash-uses-assoc-arrays &qu= ot;Ba
=C2=A0 ert-run-or-rerun-test([cl-struct-ert--stats "\\(org\\|ob\\)&quo= t; [[cl-st
=C2=A0 ert-run-tests("\\(org\\|ob\\)" #[(event-type &rest eve= nt-args) "\306
=C2=A0 ert-run-tests-batch("\\(org\\|ob\\)")
=C2=A0 ert-run-tests-batch-and-exit("\\(org\\|ob\\)")
=C2=A0 (let ((org-id-track-globally t) (org-test-selector (if org-test-sele=
=C2=A0 org-test-run-batch-tests("\\(org\\|ob\\)")
=C2=A0 eval((org-test-run-batch-tests org-test-select-re))
=C2=A0 command-line-1(("--eval" "(setq vc-handled-backends n= il org-startup-
=C2=A0 command-line()
=C2=A0 normal-top-level()
Test ob-shell/bash-uses-assoc-arrays condition:
=C2=A0 =C2=A0 (ert-test-failed
=C2=A0 =C2=A0 =C2=A0((should
=C2=A0 =C2=A0 =C2=A0 =C2=A0(equal "20 cm"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-babel-execute-src-blo= ck)))
=C2=A0 =C2=A0 =C2=A0 :form
=C2=A0 =C2=A0 =C2=A0 (equal "20 cm" "50 dl")
=C2=A0 =C2=A0 =C2=A0 :value nil :explanation
=C2=A0 =C2=A0 =C2=A0 (array-elt 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(different-at= oms
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (50 "#x= 32" "?2")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (53 "#x= 35" "?5")))))
=C2=A0 =C2=A0FAILED=C2=A0 104/510=C2=A0 ob-shell/bash-uses-assoc-arrays

Thanks,

Alan

--
OpenPGP Key ID : 040D0A3B4ED2E5C7



--
= --paf
--bcaec51d2a34ea4219050082a9ca--