#521 test_str_sep failing

v1.0 (example)
closed-fixed
nobody
None
5
2013-09-26
2013-03-12
No

test_str_sep is failing on Fedora 18:

% TEST_STR_SEP: problem 3a: output should be converted
% TEST_STR_SEP: problem 3a-bis: output should be converted

Test:
res_single=STR_SEP(2e3, '0')

if (N_elEments(res_single) NE 1) then begin
txt='problem 3a: output should be converted'
MESSAGE, txt, /continue

help,res_single
RES_SINGLE STRING = Array[6]

print,res_single
2 .

Really have no idea what is going on here.

Discussion

  • Harald Anlauf

    Harald Anlauf - 2013-03-28

    Hi Orion,
    I'm seeing the same with a self-built gdl-0.9.3 on OpenSuse.

    With IDL:
    IDL> print,res_single
    2000.00
    IDL> print,STR_SEP(10203.,'0')
    10203.0
    IDL> print,STR_SEP('10203.','0')
    1 2 3.

    while GDL:
    GDL> print,res_single
    2 .
    GDL> print,STR_SEP(10203.,'0')
    1 2 3.
    GDL> print,STR_SEP('10203.','0')
    1 2 3.

    The difference is rather obvious. However, the IDL documentation says:

    ; NAME:
    ; STR_SEP
    ;
    ; PURPOSE:
    ; This routine cuts a string into pieces which are separated by the
    ; separator string.
    ; CATEGORY:
    ; String processing.
    ; CALLING SEQUENCE:
    ; arr = STR_SEP(str, separator)
    ;
    ; INPUTS:
    ; str - The string to be separated.
    ; separator - The separator.

    I'm not fluent in IDL, so is this test valid or bogus?

     
  • Marc Schellens

    Marc Schellens - 2013-09-26
    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     
  • Harald Anlauf

    Harald Anlauf - 2013-09-26

    Marc,

    could you please post a link to a patch that fixes the bug?

     
  • Harald Anlauf

    Harald Anlauf - 2013-09-26

    Thanks, Marc.

     

Log in to post a comment.