Results for ysh-proc-meta.test.sh

statusyshysh-cpp
pass 66
FAIL 11
total77
caseyshysh-cppdescription
0pass pass with eval builtin command, in global scope
1pass pass with eval builtin command, in local scope
2pass pass with eval builtin command, making them global with names() and setVar()
3FAIL FAIL with parseCommand() then io->eval(), in local scope
detailsdetails
4pass pass with parseCommand() then io->eval(cmd, vars={out_dict: {}})
5pass pass with evalToDict()
6pass pass with runtime REFLECTION via __invoke__ - no parsing
12 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

ysh3 with parseCommand() then io->eval(), in local scope

[ysh stdout] Expected 'prefix a\nprefix b\n', got '(value.Command\n frag: \n (cmd_frag.Expr\n c: \n (Proc\n keyword: \n (Token\n id: Id.KW_Proc\n length: 4\n col: 0\n line: \n (SourceLine\n line_num: 1\n content: "proc echo_a(prefix) {\\n"\n src: \n (source.Dynamic\n what: "parseCommand()"\n location: \n (Token\n id: Id.Op_LParen\n length: 1\n col: 26\n line: \n (SourceLine\n line_num: 9\n content: " var cmd = parseCommand(s)\\n"\n src: (source.Stdin comment:"")\n )\n )\n )\n )\n )\n name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x7fb9b09bd520)\n sig: \n (proc_sig.Closed\n word: \n (ParamGroup\n params: [\n (Param\n blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x7fb9b09bd520)\n name: prefix\n )\n ]\n )\n )\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x7fb9b09bd520)\n children: [\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 4\n col: 2\n line: \n (SourceLine\n line_num: 2\n content: " echo $prefix a\\n"\n src: ...0x7fb9b09c2a50\n )\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x7fb9b09c4668])\n (CompoundWord\n parts: [\n (SimpleVarSub\n tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x7fb9b09bd680)\n )\n ]\n )\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x7fb9b09bd680)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 0\n line: (SourceLine line_num:3 content:"}\\n" src:...0x7fb9b09c2a50)\n )\n )\n )\n )\n captured_frame: [\n Dict\n ARGV\n (Cell exported:F readonly:F nameref:F val:(value.List items:[]))\n result\n (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict]))\n param\n (Cell exported:F readonly:F nameref:F val:(value.Str s:a))\n s\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:"proc echo_a(prefix) {\\n echo $prefix a\\n}\\n")\n )\n cmd\n (Cell exported:F readonly:F nameref:F val:...0x7fb9b09c2be0)\n ]\n)\n'

stdout:
(value.Command
  frag: 
    (cmd_frag.Expr
      c: 
        (Proc
          keyword: 
            (Token
              id: Id.KW_Proc
              length: 4
              col: 0
              line: 
                (SourceLine
                  line_num: 1
                  content: "proc echo_a(prefix) {\n"
                  src: 
                    (source.Dynamic
                      what: "parseCommand()"
                      location: 
                        (Token
                          id: Id.Op_LParen
                          length: 1
                          col: 26
                          line: 
                            (SourceLine
                              line_num: 9
                              content: "    var cmd = parseCommand(s)\n"
                              src: (source.Stdin comment:"")
                            )
                        )
                    )
                )
            )
          name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x7fb9b09bd520)
          sig: 
            (proc_sig.Closed
              word: 
                (ParamGroup
                  params: [
                    (Param
                      blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x7fb9b09bd520)
                      name: prefix
                    )
                  ]
                )
            )
          body: 
            (BraceGroup
              left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x7fb9b09bd520)
              children: [
                (command.Simple
                  blame_tok: 
                    (Token
                      id: Id.Lit_Chars
                      length: 4
                      col: 2
                      line: 
                        (SourceLine
                          line_num: 2
                          content: "  echo $prefix a\n"
                          src: ...0x7fb9b09c2a50
                        )
                    )
                  more_env: []
                  words: [
                    (CompoundWord parts:[...0x7fb9b09c4668])
                    (CompoundWord
                      parts: [
                        (SimpleVarSub
                          tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x7fb9b09bd680)
                        )
                      ]
                    )
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x7fb9b09bd680)]
                    )
                  ]
                  is_last_cmd: F
                )
              ]
              right: 
                (Token
                  id: Id.Lit_RBrace
                  length: 1
                  col: 0
                  line: (SourceLine line_num:3 content:"}\n" src:...0x7fb9b09c2a50)
                )
            )
        )
    )
  captured_frame: [
    Dict
    ARGV
    (Cell exported:F readonly:F nameref:F val:(value.List items:[]))
    result
    (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict]))
    param
    (Cell exported:F readonly:F nameref:F val:(value.Str s:a))
    s
    (Cell
      exported: F
      readonly: F
      nameref: F
      val: (value.Str s:"proc echo_a(prefix) {\n  echo $prefix a\n}\n")
    )
    cmd
    (Cell exported:F readonly:F nameref:F val:...0x7fb9b09c2be0)
  ]
)
stderr:
      echo_a zz
      ^~~~~~
[ stdin ]:15: 'echo_a' not found (OILS-ERR-100)
[ stdin ]:15: errexit PID 32779: command.Simple failed with status 127
ysh-cpp3 with parseCommand() then io->eval(), in local scope

[ysh-cpp stdout] Expected 'prefix a\nprefix b\n', got '(value.Command\n frag: \n (cmd_frag.Expr\n c: \n (Proc\n keyword: \n (Token\n id: Id.KW_Proc\n length: 4\n col: 0\n line: \n (SourceLine\n line_num: 1\n content: "proc echo_a(prefix) {\\n"\n src: \n (source.Dynamic\n what: "parseCommand()"\n location: \n (Token\n id: Id.Op_LParen\n length: 1\n col: 26\n line: \n (SourceLine\n line_num: 9\n content: " var cmd = parseCommand(s)\\n"\n src: (source.Stdin comment:"")\n )\n )\n )\n )\n )\n name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x16ce)\n sig: \n (proc_sig.Closed\n word: \n (ParamGroup\n params: [\n (Param\n blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x16ce)\n name: prefix\n )\n ]\n )\n )\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x16ce)\n children: [\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 4\n col: 2\n line: (SourceLine line_num:2 content:" echo $prefix a\\n" src:...0x2a41)\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x164e])\n (CompoundWord\n parts: [\n (SimpleVarSub\n tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x1656)\n )\n ]\n )\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x1656)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 0\n line: (SourceLine line_num:3 content:"}\\n" src:...0x2a41)\n )\n )\n )\n )\n captured_frame: [\n Dict\n ARGV\n (Cell exported:F readonly:F nameref:F val:(value.List items:[]))\n result\n (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict]))\n param\n (Cell exported:F readonly:F nameref:F val:(value.Str s:a))\n s\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:"proc echo_a(prefix) {\\n echo $prefix a\\n}\\n")\n )\n cmd\n (Cell exported:F readonly:F nameref:F val:...0x29a5)\n ]\n)\n'

stdout:
(value.Command
  frag: 
    (cmd_frag.Expr
      c: 
        (Proc
          keyword: 
            (Token
              id: Id.KW_Proc
              length: 4
              col: 0
              line: 
                (SourceLine
                  line_num: 1
                  content: "proc echo_a(prefix) {\n"
                  src: 
                    (source.Dynamic
                      what: "parseCommand()"
                      location: 
                        (Token
                          id: Id.Op_LParen
                          length: 1
                          col: 26
                          line: 
                            (SourceLine
                              line_num: 9
                              content: "    var cmd = parseCommand(s)\n"
                              src: (source.Stdin comment:"")
                            )
                        )
                    )
                )
            )
          name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x16ce)
          sig: 
            (proc_sig.Closed
              word: 
                (ParamGroup
                  params: [
                    (Param
                      blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x16ce)
                      name: prefix
                    )
                  ]
                )
            )
          body: 
            (BraceGroup
              left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x16ce)
              children: [
                (command.Simple
                  blame_tok: 
                    (Token
                      id: Id.Lit_Chars
                      length: 4
                      col: 2
                      line: (SourceLine line_num:2 content:"  echo $prefix a\n" src:...0x2a41)
                    )
                  more_env: []
                  words: [
                    (CompoundWord parts:[...0x164e])
                    (CompoundWord
                      parts: [
                        (SimpleVarSub
                          tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x1656)
                        )
                      ]
                    )
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x1656)]
                    )
                  ]
                  is_last_cmd: F
                )
              ]
              right: 
                (Token
                  id: Id.Lit_RBrace
                  length: 1
                  col: 0
                  line: (SourceLine line_num:3 content:"}\n" src:...0x2a41)
                )
            )
        )
    )
  captured_frame: [
    Dict
    ARGV
    (Cell exported:F readonly:F nameref:F val:(value.List items:[]))
    result
    (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict]))
    param
    (Cell exported:F readonly:F nameref:F val:(value.Str s:a))
    s
    (Cell
      exported: F
      readonly: F
      nameref: F
      val: (value.Str s:"proc echo_a(prefix) {\n  echo $prefix a\n}\n")
    )
    cmd
    (Cell exported:F readonly:F nameref:F val:...0x29a5)
  ]
)
stderr:
      echo_a zz
      ^~~~~~
[ stdin ]:15: 'echo_a' not found (OILS-ERR-100)
[ stdin ]:15: errexit PID 32802: command.Simple failed with status 127