extern crate harsh;
fn main() {
let h = harsh::HarshBuilder::new()
.init().unwrap();
h.decode("non-alphabet.characters=will|cause$panic");
println!("No hello worlds :(");
}
And the output:
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/harsh-test`
thread 'main' panicked at 'what a world, what a world!', libcore/option.rs:914:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Expected the decode to return Option::None, not panic.
Here's the test case:
And the output:
Expected the decode to return
Option::None
, not panic.Harsh version 0.1.4