Skip to content

Commit 1f56b00

Browse files
scripts/test.py: cibw_do_test_project(): restored missing call of longjmp().
1 parent c3e33ed commit 1f56b00

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎scripts/test.py‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -984,10 +984,12 @@ def build():
984984
with open(f'{testdir}/foo.i', 'w') as f:
985985
f.write(textwrap.dedent('''
986986
%{
987+
#include <stdexcept>
988+
989+
#include <assert.h>
987990
#include <setjmp.h>
988991
#include <stdio.h>
989992
#include <string.h>
990-
#include <stdexcept>
991993
992994
int qwerty(void);
993995
@@ -1000,11 +1002,11 @@ def build():
10001002
printf("bar(): q=%i\\n", q);
10011003
10021004
int len = (int) strlen(text);
1003-
printf("bar(): len=%i\\\\n", len);
1004-
//printf("calling longjmp().\\n");
1005-
//longjmp(jmpbuf, 1);
1005+
printf("bar(): len=%i\\n", len);
1006+
printf("calling longjmp().\\n");
10061007
fflush(stdout);
1007-
return len;
1008+
longjmp(jmpbuf, 1);
1009+
assert(0);
10081010
}
10091011
int bar1(const char* text)
10101012
{

0 commit comments

Comments
 (0)