Merge branch 'optimizations'
This commit is contained in:
@@ -24,6 +24,7 @@ fop_fail: $(BIN)/fop
|
||||
! printf 'test\n' | $(BIN)/fop 1 cat
|
||||
! printf 'test\n' | $(BIN)/fop 'test' cat
|
||||
! printf 'test\n' | $(BIN)/fop -d'test' cat
|
||||
! $(BIN)/fop
|
||||
|
||||
.PHONY: fop_functionality
|
||||
fop_functionality: $(BIN)/fop
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# notice are preserved. This file is offered as-is, without any warranty.
|
||||
|
||||
.PHONY: mm_tests
|
||||
mm_tests: mm_args mm_help mm_stderr mm_remaining
|
||||
mm_tests: mm_args mm_help mm_stderr mm_remaining mm_remaining_options
|
||||
|
||||
.PHONY: mm_none
|
||||
mm_none: $(BIN)/mm
|
||||
@@ -32,3 +32,9 @@ mm_remaining: $(BIN)/mm
|
||||
test "$$($(BIN)/mm -i README COPYING)" = "$$(cat README COPYING)"
|
||||
$(BIN)/mm -i README -o /tmp/mm_test0 /tmp/mm_test1
|
||||
diff /tmp/mm_test0 /tmp/mm_test1
|
||||
|
||||
.PHONY: mm_remaining_options
|
||||
# check to make sure mm -i with trailing arguments interprets -o as one
|
||||
mm_remaining_options:
|
||||
! $(BIN)/mm -i README COPYING -o - 2>&1 | cut -d: -f2 \
|
||||
| xargs test " -o" =
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# notice are preserved. This file is offered as-is, without any warranty.
|
||||
|
||||
.PHONY: rpn_tests
|
||||
rpn_tests: rpn_help rpn_add rpn_sub rpn_mul rpn_div rpn_mod rpn_flr
|
||||
rpn_tests: rpn_help rpn_add rpn_sub rpn_mul rpn_div rpn_mod rpn_flr rpn_stdin
|
||||
|
||||
.PHONY: rpn_help
|
||||
rpn_help: $(BIN)/rpn
|
||||
@@ -41,3 +41,8 @@ rpn_mod: $(BIN)/rpn
|
||||
rpn_flr: $(BIN)/rpn
|
||||
test "$$($(BIN)/rpn 12 5 //)" -eq 2
|
||||
test "$$($(BIN)/rpn 9 4 //)" -eq 2
|
||||
|
||||
# done last because all operations have been tested
|
||||
.PHONY: rpn_stdin
|
||||
rpn_stdin: $(BIN)/rpn
|
||||
test "$$(printf '1\n2\n+\n3\n-\n' | $(BIN)/rpn | tail -n1)" -eq 0
|
||||
|
||||
Reference in New Issue
Block a user