view scripts/test/link.test @ 1433:00c20f410c46 draft

Patches to commands for issues reported from static analysis tool. portability.h.patch - it is for O_CLOEXEC, as compiler complained of it. Makefile.patch - for cleaning generated/*.o files and libopts.dat file [Fixup to uniq.c from Rob.]
author Ashwini Sharma <ak.ashwini1981@gmail.com>
date Tue, 12 Aug 2014 07:09:01 -0500
parents 7e0c577a977e
children 5d51c5d6df72
line wrap: on
line source

#!/bin/bash

[ -e testing.sh ] && . testing.sh

echo "" >foo
testing "link has same inode" "link foo bar && stat -c '%DI%i bar'" "stat -c '%DI%i' foo" "" ""
testing "link fails on non-existent file" "link foo/foo baz || echo GOOD" "GOOD\n" "" ""
rm -f foo bar