#!/bin/sh
#
# opkhelper
# tests/t_installfiles_dir
#
# Copyright (C) 2013  Patrick "P. J." McDermott
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.

mkdir -p foo.pkg
cat >foo.pkg/files <<-EOF
	/usr/bin
	EOF

mkdir -p tmp/dest/usr/bin
>tmp/dest/usr/bin/foo

cd tmp
OPK_PACKAGES='foo' oh-installfiles
assert test_non_dir_nodes dest
assert test_nodes foo.data / /usr/ /usr/bin/ /usr/bin/foo
cd ..

rm -Rf foo.pkg tmp