ip2d 0.5.0

A converter for IPv4 addresses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@test "can run our script" {
    ./target/release/ip2d -h
}

@test "convert the right number" {
    OUTPUT=$(./target/release/ip2d 1.1.1.1)
    [ "$OUTPUT" -eq 16843009 ]
}

@test "convert the right hex number" {
    OUTPUT=$(./target/release/ip2d 1.1.1.1 -x)
    [ "$OUTPUT" = "0x01010101" ]
}

@test "convert the right ip" {
    OUTPUT=$(./target/release/ip2d -r 16843009)
    [ "$OUTPUT" = "1.1.1.1" ]
}