+
+# Try passing store file names.
+
+guix graph -t references guile-bootstrap > "$tmpfile1"
+guix graph -t references `guix build guile-bootstrap` > "$tmpfile2"
+cmp "$tmpfile1" "$tmpfile2"
+
+# XXX: Filter the file names in the graph to work around the fact that we get
+# a mixture of relative and absolute file names.
+guix graph -t derivation coreutils > "$tmpfile1"
+guix graph -t derivation `guix build -d coreutils` > "$tmpfile2"
+cmp "$tmpfile1" "$tmpfile2"
+
+# Try package transformation options.
+guix graph git | grep 'label = "openssl'
+guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
+if guix graph git --with-input=openssl=libressl | grep 'label = "openssl'
+then false; else true; fi
+
+# Try --load-path
+guix graph -L $module_dir dummy | grep 'label = "dummy'
+
+# Displaying shortest paths (or lack thereof).
+if guix graph --path emacs vim; then false; else true; fi
+
+path="\
+emacs
+gnutls
+guile
+libffi"
+test "`guix graph --path emacs libffi | cut -d '@' -f1`" = "$path"
+
+# At the derivation level, there's a direct path because libffi is propagated
+# via gtk+.
+test "`guix graph --path -t derivation emacs libffi | wc -l`" -ge 2