Skip to content

Commit ba8bb20

Browse files
committed
TEST: added test for crash situation described (and fixed) in this commit: zsx@cc625be
1 parent e25a5d9 commit ba8bb20

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/tests/run-tests.r3

+2
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ wrap load %units/rsa-test.r3
1717
wrap load %units/dh-test.r3
1818
wrap load %units/port-test.r3
1919

20+
wrap load %units/crash-test.r3
21+
2022
***end-run***

src/tests/units/crash-test.r3

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Rebol [
2+
Title: "Rebol3 crash test script"
3+
Author: "Oldes, Peter W A Wood"
4+
File: %dh-test.red
5+
Tabs: 4
6+
Needs: [%../quick-test-module.r3]
7+
]
8+
9+
~~~start-file~~~ "Crash tests"
10+
11+
===start-group=== "Series crashes"
12+
13+
--test-- "DH keys generation"
14+
;@@ situation fixed in: https://github.com/zsx/r3/commit/cc625bebcb6038b9282876954f929c9d80048d2b
15+
16+
a: copy ""
17+
insert/dup a #"a" to integer! #10ffff
18+
take/part a 3
19+
take/part a to integer! #f0010
20+
21+
insert/dup a #"b" 10
22+
a: 1 ;force a to recycle
23+
recycle ;@@ <-- it was crashing here
24+
--assert 1 = a
25+
26+
===end-group===
27+
28+
~~~end-file~~~

0 commit comments

Comments
 (0)