#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2018, Intel Corporation
#
#
# pmempool_help/TEST1 -- test for pmempool help
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type pmem non-pmem

setup

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

for cmd in info dump create check
do
	rm -f help_${cmd}.log ${cmd}_help.log
	expect_normal_exit $PMEMPOOL$EXESUFFIX help $cmd >> help_${cmd}.log
	expect_normal_exit $PMEMPOOL$EXESUFFIX ${cmd} --help >> ${cmd}_help.log
	diff help_${cmd}.log ${cmd}_help.log >> $LOG
done

expect_normal_exit $PMEMPOOL$EXESUFFIX help help >> $LOG

check

pass
