Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Skipping gdbm test



On Fri, 3 Mar 2017 09:55:15 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> I think the proposal was to removal lines 2,3 but keep lines 1,4:
> 
> >>>>      1 /opt/src/zsh-2017-03-01/Test/V11db_gdbm.ztst: starting.
> >>>>      2 (eval):3: failed to load module `zsh/db/gdbm':
> >>>>      3 /opt/build/zsh-2017-03-01/Test/Modules/zsh/db/gdbm.so: cannot open shared object file: No such file or directory
> >>>>      4 /opt/src/zsh-2017-03-01/Test/V11db_gdbm.ztst: skipped (can't load zsh/db/gdbm module for testing)
> 
> Personally I think it'd be good to hide that particular
> error message; line 4 tells the user what he needs to know.

Oh, yes, we don't need the shell error message, since it's not a hard
test error.  The skipped message from the test system is enough.  This
is how various of the other module tests work.

pws

diff --git a/Test/V11db_gdbm.ztst b/Test/V11db_gdbm.ztst
index 486ad48..1d80f28 100644
--- a/Test/V11db_gdbm.ztst
+++ b/Test/V11db_gdbm.ztst
@@ -4,7 +4,7 @@
 
  modname="zsh/db/gdbm"
  dbfile=db.gdbm
- if ! zmodload $modname ; then
+ if ! zmodload $modname 2>/dev/null; then
    ZTST_unimplemented="can't load $modname module for testing"
  fi
  rm -f db.gdbm



Messages sorted by: Reverse Date, Date, Thread, Author