1pro test_bug_2876161 2 3 err = 0 4 5; 6if !version.os_family eq 'Windows' then begin 7 message,/continue,' involves spawning & shell tools -> Windows hangup, so fake success returned' 8 return 9 endif 10; 11 if n_elements(string([0], " ", [1], /print)) ne 3 then begin 12 message, /conti, '[0], " ", [1]' 13 err++ 14 endif 15 16 if n_elements(string(0, " ", [1], /print)) ne 1 then begin 17 message, /conti, '0, " ", [1]' 18 err++ 19 endif 20 21 spawn, '../src/gdl -quiet -e "print, [[1,2],[3,4]], ''''"', res, count=cnt 22 if cnt ne 2 then begin 23 message, /conti, 'print, [[1,2],[3,4]], ''''' 24 err++ 25 endif 26 27 spawn, '../src/gdl -quiet -e "print, ''Hello world'', ''''" | wc -l', res, count=cnt 28 if fix(res) ne 1 then begin 29 message, /conti, 'print, ''Hello world'', ''''' 30 err++ 31 endif 32 33 spawn, '../src/gdl -quiet -e "print, 1, ''''" | wc -l', res, count=cnt 34 if fix(res) ne 1 then begin 35 message, /conti, 'print, 1, ''''' 36 err++ 37 endif 38 39 arg = '0, [1], 1, 1, [2,2,3], 4, [3]' 40 spawn, '../src/gdl -quiet -e "print, ' + arg + '" | wc -l', res, count=cnt 41 if fix(res) ne 5 then begin 42 message, /conti, 'print, ' + arg 43 err++ 44 endif 45 46 if err ne 0 then exit, status=1 47 48end 49