File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 998998
999999end
10001000
1001+ local _ENV = TEST_CASE ' multi_add_remove' if ENABLE then
1002+
1003+ local m , c
1004+
1005+ function setup ()
1006+ m = assert (scurl .multi ())
1007+ end
1008+
1009+ function teardown ()
1010+ if c then c :close () end
1011+ if m then m :close () end
1012+ m , c = nil
1013+ end
1014+
1015+ function test_remove_unknow_easy ()
1016+ c = assert (scurl .easy ())
1017+ assert_equal (m , m :remove_handle (c ))
1018+ end
1019+
1020+ function test_double_remove_easy ()
1021+ c = assert (scurl .easy ())
1022+ assert_equal (m , m :add_handle (c ))
1023+ assert_equal (m , m :remove_handle (c ))
1024+ assert_equal (m , m :remove_handle (c ))
1025+ end
1026+
1027+ function test_double_add_easy ()
1028+ c = assert (scurl .easy ())
1029+ assert_equal (m , m :add_handle (c ))
1030+ assert_nil (m :add_handle (c ))
1031+ end
1032+
1033+ end
1034+
10011035RUN ()
You can’t perform that action at this time.
0 commit comments