tests/bonsai: rpn.mk: tests the standard input
This commit is contained in:
		
							parent
							
								
									a0138be79e
								
							
						
					
					
						commit
						5eb71e90a3
					
				| @ -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 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user