File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
ktor-client/ktor-client-curl/desktop/test/io/ktor/client/engine/curl/test Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3
+ */
4
+
5
+ package io.ktor.client.engine.curl.test
6
+
7
+ import kotlinx.cinterop.*
8
+ import libcurl.curl_easy_cleanup
9
+ import libcurl.curl_easy_getinfo
10
+ import libcurl.curl_easy_init
11
+ import kotlin.test.Test
12
+
13
+ @OptIn(ExperimentalForeignApi ::class )
14
+ class CurlSettingsTest {
15
+
16
+ @Test
17
+ fun `test CURLINFO_CAPATH and CURLINFO_CAINFO` () = memScoped {
18
+ val curl = curl_easy_init()
19
+
20
+ val caPath = allocPointerTo<ByteVar >()
21
+ curl_easy_getinfo(curl, libcurl.CURLINFO_CAPATH , caPath.ptr)
22
+ println (" CURLINFO_CAPATH: " + caPath.value?.toKString())
23
+
24
+ val caInfo = allocPointerTo<ByteVar >()
25
+ curl_easy_getinfo(curl, libcurl.CURLINFO_CAINFO , caInfo.ptr)
26
+ println (" CURLINFO_CAINFO:" + caInfo.value?.toKString())
27
+
28
+ curl_easy_cleanup(curl)
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments