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"
|
||||
|
||||
[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() {
|
||||
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::net::TcpStream;
|
||||
|
||||
fn main() {
|
||||
pub fn main() {
|
||||
let connector = TlsConnector::new().unwrap();
|
||||
|
||||
let stream = TcpStream::connect("google.com:443").unwrap();
|
Loading…
Add table
Reference in a new issue