Menu

#72 bash 5.1 - make check -> parm : FAILED

v1.0_(example)
open
nobody
None
5
2021-07-13
2021-07-12
No

Something to do with the latest patches ?

--- /data/projects/bashdb-5.1/test/integration/parm.check
+++ /data/projects/bashdb-5.1/test/data/parm.right
@@ -116,7 +116,7 @@
(parm.sh:29):
29: exit 0
+ev echo "eval says exit was $?"
-eval says exit was 0
+eval says exit was 5
$? is 0
+pr "print says exit was $?"
print says exit was 5
+ return 1
+ return 1

Discussion

  • Roland Christmann

    the side effect is coming from this line in command/eval.sh :
    builtin echo "BASH_ARGV0=\"$_Dbg_dollar_0\"" >> "$_Dbg_evalfile"
    if I place this line where it was : parm test is OK but the expression will not be evaluated.
    if I remove this line : parm test is OK

     
  • Roland Christmann

    With this patch, make check (PASS: test-parm) and the regular expressions are correctly evaluated.

    --- b/eval.sh   2021-07-09 14:29:51.541083049 +0200
    +++ c/eval.sh   2021-07-12 15:11:01.550555609 +0200
    @@ -1,7 +1,7 @@
     # -*- shell-script -*-
     # Eval and Print commands.
     #
    -#   Copyright (C) 2002, 2003-2004, 2006, 2008, 2011, 2015, 2019-2020
    +#   Copyright (C) 2002, 2003-2004, 2006, 2008, 2011, 2015, 2019-2021
     #   Rocky Bernstein <rocky@gnu.org>
     #
     #   This program is free software; you can redistribute it and/or
    @@ -71,7 +71,6 @@
     _Dbg_do_eval() {
    
         builtin echo ". ${_Dbg_libdir}/set-d-vars.sh" > "$_Dbg_evalfile"
    -    builtin echo "BASH_ARGV0=\"$_Dbg_dollar_0\"" >> "$_Dbg_evalfile"
         if (( $# == 0 )) ; then
            # FIXME: add parameter to get unhighlighted line, or
            # always save a copy of that in _Dbg_get_source_line
    @@ -93,12 +92,14 @@
                source_line="$_Dbg_bash_command"
            fi
    
    +        builtin echo "BASH_ARGV0=\"$_Dbg_dollar_0\"" >> "$_Dbg_evalfile"
            builtin echo "$source_line" >> "$_Dbg_evalfile"
            _Dbg_msg "eval: ${source_line}"
            _Dbg_source_line="$source_line_save"
            _Dbg_set_highlight=$_Dbg_highlight_save
         else
            builtin echo -e "$@" >> "$_Dbg_evalfile"
    +        builtin echo "BASH_ARGV0=\"$_Dbg_dollar_0\"" >> "$_Dbg_evalfile"
         fi
         if [[ -n "$_Dbg_tty"  ]] ; then
            . "$_Dbg_evalfile" >>"$_Dbg_tty"
    
     

    Last edit: Roland Christmann 2021-07-12
  • Rocky Bernstein

    Rocky Bernstein - 2021-07-13

    Should be in commit 9a0bf97 now.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.