代码拉取完成,页面将自动刷新
#!/bin/sh
# unit test for sum.
# Copyright 2007 by Bernhard Reutner-Fischer
# Licensed under GPLv2 or later, see file LICENSE in this source tree.
# AUDIT: Unit tests for sum
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing to stdout
testing "sum -r file doesn't print file's name" \
"sum -r '$0' | grep -c '$0' && echo wrongly_printed_filename || echo yes" \
"0\nyes\n" "" ""
testing "sum -r file file does print both names" \
"sum -r '$0' '$0' | grep -c '$0' && echo yes || echo wrongly_omitted_filename" \
"2\nyes\n" "" ""
testing "sum -s file does print file's name" \
"sum -s '$0' | grep -c '$0' && echo yes || echo wrongly_omitted_filename" \
"1\nyes\n" "" ""
exit $FAILCOUNT
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。