binaryornot 1.0.0

Detect whether a file is binary or not
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use binaryornot;

#[test]
fn pyc_is_binary() {
    assert_eq!(binaryornot::is_binary("tests/files/hello_world.pyc").unwrap(), true);
}

#[test]
fn empty_pyc_is_binary() {
    assert_eq!(binaryornot::is_binary("tests/files/empty.pyc").unwrap(), true);
}

#[test]
fn troublesome_pyc_is_binary() {
    assert_eq!(binaryornot::is_binary("tests/files/troublesome.pyc").unwrap(), true);
}