2007年5月7日星期一

GNU Hello

在读许彦明的"轻轻松松产生Makefile"时, 看到里面提到了GNU Coding Standards (http://www.gnu.org/prep/standards/). 在GNU Coding Standards中提到了GNU Hello program (http://www.gnu.org/software/hello/hello.html).

目前最新版本是hello-2.2, 下载之后进行configure, make.
在source code中有一个test目录. 里面有几个脚本文件. 要运行这几个脚本文件, 需要将"hello"所在的路径加入${PATH}中.

greeting-1: 测试-g参数, 是否与预料的结果一致.
greeting-2: 这个也是测试-g参数, 只是-g之后的字符串比较长, 运行时提示必须在"full moon"时才能运行.
hello-1: 测试不跟参数时的结果是否与预料的一致.
traditional-1: 测试传统的结果"hello, world"

没有评论: