test: add regression test for native-tls crate
This commit is contained in:
parent
4bd50bdadf
commit
e2f2015e06
3 changed files with 12 additions and 2 deletions
|
@ -4,4 +4,4 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
native-tls = "0.2"
|
native-tls = { version = "0.2", features = ["vendored"] }
|
||||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -1,3 +1,13 @@
|
||||||
|
mod tls;
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
tls::main();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn passes() {
|
||||||
|
println!("passes okay");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ use native_tls::TlsConnector;
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::net::TcpStream;
|
use std::net::TcpStream;
|
||||||
|
|
||||||
fn main() {
|
pub fn main() {
|
||||||
let connector = TlsConnector::new().unwrap();
|
let connector = TlsConnector::new().unwrap();
|
||||||
|
|
||||||
let stream = TcpStream::connect("google.com:443").unwrap();
|
let stream = TcpStream::connect("google.com:443").unwrap();
|
Loading…
Add table
Reference in a new issue