Commit 216db146 authored by Jeromy's avatar Jeromy
Browse files

more vendoring

parent e1427950
#!/bin/sh
#
# Copyright (c) 2015 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
test_description="Basic tests"
. lib/test-lib.sh
test_expect_success "current dir is writable" '
echo "It works!" >test.txt
'
test_expect_success "multihash is available" '
type multihash
'
test_expect_success "multihash help output looks good" '
test_must_fail multihash -h 2>help.txt &&
cat help.txt | egrep -i "^usage:" >/dev/null &&
cat help.txt | egrep -i "multihash .*options.*file" >/dev/null
'
test_done
#!/bin/sh
#
# Copyright (c) 2015 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
test_description="sha1 tests"
. lib/test-lib.sh
test_expect_success "setup sha1 tests" '
echo "Hash me!" >hash_me.txt &&
SHA1=bc6f2c3cd945bc754789e50b2f68deee2f421810 &&
echo "1114$SHA1" >actual
'
test_expect_success "'multihash -a=sha1 -e=hex' works" '
multihash -a=sha1 -e=hex hash_me.txt >expected
'
test_expect_success "'multihash -a=sha1 -e=hex' output looks good" '
test_cmp expected actual
'
test_expect_success SHASUM "check hash using shasum" '
echo "$SHA1 hash_me.txt" >actual &&
$SHASUMBIN hash_me.txt >expected &&
test_cmp expected actual
'
test_done
......@@ -9,7 +9,7 @@ package loggables
import (
"net"
ma "github.com/jbenet/go-multiaddr"
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
logging "QmWRypnfEwrgH4k93KEHN5hng7VjKYkWmzDYRuTZeh2Mgh/go-log"
......
......@@ -12,7 +12,7 @@ import (
peer "github.com/ipfs/go-libp2p/p2p/peer"
u "util"
ma "github.com/jbenet/go-multiaddr"
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
)
// ZeroLocalTCPAddress is the "zero" tcp local multiaddr. This means:
......
......@@ -3,9 +3,9 @@ package testutil
import (
"testing"
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
ci "github.com/ipfs/go-libp2p/p2p/crypto"
peer "github.com/ipfs/go-libp2p/p2p/peer"
ma "github.com/jbenet/go-multiaddr"
)
type Identity interface {
......
......@@ -12,8 +12,8 @@ import (
"strings"
"time"
b58 "github.com/jbenet/go-base58"
mh "github.com/jbenet/go-multihash"
b58 "QmNsoHoCVhgXcv1Yg45jtkMgimxorTAN36fV9AQMFXHHAQ/go-base58"
mh "QmdeauTdyf38KDQB4Cc4CurPWRRb5pej27NCXPA7kbPTJy/go-multihash"
)
// Debug is a global flag for debugging.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment