test: add regression test for native-tls crate
All checks were successful
/ test (map[name:nightly]) (push) Successful in 39s
/ test (map[name:stable]) (push) Successful in 39s

This commit is contained in:
Paul Campbell 2025-01-14 20:59:32 +00:00
parent 4bd50bdadf
commit e2f2015e06
3 changed files with 12 additions and 2 deletions

View file

@ -4,4 +4,4 @@ version = "0.1.0"
edition = "2021"
[dependencies]
native-tls = "0.2"
native-tls = { version = "0.2", features = ["vendored"] }

View file

@ -1,3 +1,13 @@
mod tls;
fn main() {
println!("Hello, world!");
tls::main();
}
#[cfg(test)]
mod tests {
#[test]
fn passes() {
println!("passes okay");
}
}

View file

@ -2,7 +2,7 @@ use native_tls::TlsConnector;
use std::io::{Read, Write};
use std::net::TcpStream;
fn main() {
pub fn main() {
let connector = TlsConnector::new().unwrap();
let stream = TcpStream::connect("google.com:443").unwrap();