Use expect

Co-authored-by: John Ericson <git@JohnEricson.me>
This commit is contained in:
Eelco Dolstra 2023-11-02 13:40:54 +01:00 committed by GitHub
parent d7710a40be
commit d26c317b14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,7 @@ diff -u baz.cat-nar $storePath/foo/baz
# Check that 'nix store cat' fails on invalid store paths.
invalidPath="$(dirname $storePath)/99999999999999999999999999999999-foo"
mv $storePath $invalidPath
(! nix store cat $invalidPath/foo/baz)
expect 1 nix store cat $invalidPath/foo/baz
mv $invalidPath $storePath
# Test --json.