Commits

khorser committed 051fde0

Don't catch SIGSEGV with FEAT_MZSCHEME, update tests

  • Participants
  • Parent commits 4e268c1

Comments (0)

Files changed (5)

-" intersperse lines below with :mz (collect-garbage)
 :MzScheme
 :e if_cscope.c
 :spli if_mzsch.c
 buf if_cscope.c
 :mz (define b (vim-curr-buff))
+:mz (collect-garbage)
 :mz (define b2 (vim-get-buff-by-name "if_mzsch.c"))
+:mz (collect-garbage)
 :mz (vim-get-buff-line-list 1 2 b2)
+:mz (collect-garbage)
 :mz (vim-get-buff-line-list 1 2 b)
+:mz (collect-garbage)
 :mz (vim-buff-valid? b)
+:mz (collect-garbage)
 :mz (vim-buff-valid? b2)
+:mz (collect-garbage)
 :bw
+:mz (collect-garbage)
 :mz (vim-buff-valid? b)
+:mz (collect-garbage)
 :mz (vim-buff-valid? b2)
+:mz (collect-garbage)
-make CONF_OPT_FEAT=--with-features=big CONF_OPT_GUI=--enable-gui=gtk2 prefix=$HOME/local CONF_OPT_MZSCHEME=--enable-mzschemeinterp CFLAGS="-g -O0" LDFLAGS=-g STRIP=/bin/true $*
+make CONF_OPT_FEAT=--with-features=big CONF_OPT_GUI=--enable-gui=gtk2 prefix=$HOME/local CONF_OPT_MZSCHEME=--enable-mzschemeinterp CFLAGS="-g -O0 -DMZSCHEME_FORCE_GC" LDFLAGS=-g STRIP=/bin/true $*

File src/os_unix.c

 #ifdef SIGBUS
     {SIGBUS,	    "BUS",	TRUE},
 #endif
-#ifdef SIGSEGV
+#if defined(SIGSEGV) && !defined(FEAT_MZSCHEME)
+    /* MzScheme uses SEGV in its garbage collector */
     {SIGSEGV,	    "SEGV",	TRUE},
 #endif
 #ifdef SIGSYS

File src/testdir/test70.in

 :let res = "FAILED"
 :endif
 :call setline(search("^3"), "circular test " . res)
+:" funcrefs
+:mz (define vim:getpos (vim-eval "function('getpos')"))
+:call cursor(3, 2)
+:mz (define pos (vim:getpos "."))
+:let b = mzeval('(car pos)')
+:let l = mzeval('(cadr pos)')
+:let c = mzeval('pos')[2]
+:if b == 0 && l == 2 and c == 3
+:let fref_res = "OK"
+:else
+:let fref_res = "FAILED"
+:end
+:call append(line('$'), 'funcrefs OK')
 :?^1?,$w! test.out
 :qa!
 ENDTEST

File src/testdir/test70.ok

 2 line 2
 dictionary with list OK
 circular test OK
+funcrefs OK