#!/bin/sh
# Copyright 2018 by Denys Vlasenko
# Licensed under GPLv2 or later, see file LICENSE in this source tree.

. ./testing.sh

# testing "test name" "command" "expected result" "file input" "stdin"

testing "bc comment 1" \
	"bc" \
	"3\n" \
	"" "1 /* comment */ + 2"

testing "bc comment 2: /*/ is not a closed comment" \
	"bc" \
	"4\n" \
	"" "1 /*/ + 2 */ + 3"

testing "bc comment 3: unterminated #comment" \
	"bc" \
	"" \
	"" "#foo"  # no trailing newline

testing "bc backslash 1" \
	"bc" \
	"3\n" \
	"" "1 \\\\\n + 2"

testing "bc string 1" \
	"bc" \
	"STR\n" \
	"" "\"STR\n\""

testing "bc read() 4<EOF>" \
	"bc input" \
	"4\n" \
	"read();halt" "4"

testing "bc read()^2" \
	"bc input" \
	"16\n" \
	"read()^2;halt" "4\n"

testing "bc read()*read()" \
	"bc input" \
	"20\n" \
	"read()*read();halt" "4\n5"

testing "bc if 0 else" \
	"bc" \
	"2\n9\n" \
	"" "if (0) 1 else 2; 9"

testing "bc if 1 else" \
	"bc" \
	"1\n9\n" \
	"" "if (1) 1 else 2; 9"

testing "bc if 1 if 1 else else" \
	"bc" \
	"1\n9\n" \
	"" "if (1) if (1) 1 else 2 else 3; 9"

testing "bc if 0 else if 1" \
	"bc" \
	"2\n9\n" \
	"" "if (0) 1 else if (1) 2; 9"

testing "bc for(;;)" \
	"bc" \
	"2\n3\n2\n9\n" \
	"" "i=2; for (;;) { 2; if(--i==0) break; 3; }; 9"

testing "bc for (;cond;)" \
	"bc" \
	"1\n2\n3\n9\n" \
	"" "i=0; for(;i<3;)++i; 9"

testing "bc for (;cond;upd)" \
	"bc" \
	"1\n2\n3\n9\n" \
	"" "i=1; for(;i<4;i++)i; 9"

testing "bc for (init;cond;upd)" \
	"bc" \
	"1\n2\n3\n9\n" \
	"" "for(i=1;i<4;i++)i; 9"

testing "bc define auto" \
	"bc" \
	"8\n9\n" \
	"" "define w() { auto z; return 8; }; w(); 9"

testing "bc define with body on next line" \
	"bc" \
	"8\n9\n" \
	"" "define w()\n{ auto z; return 8; }\nw()\n9"

testing "bc if(cond)<NL>" \
	"bc" \
	"9\n" \
	"" "if(0)\n3\n9"

testing "bc if(cond) stmt else<NL>" \
	"bc" \
	"4\n9\n" \
	"" "if(0)3 else\n4\n9"

testing "bc while(cond)<NL>" \
	"bc" \
	"8\n7\n6\n5\n4\n3\n2\n1\n9\n" \
	"" "i=9;while(--i)\ni\n9"

testing "bc ifz does not match if keyword" \
	"bc" \
	"1\n2\n2\n3\n" \
	"" "ifz=1;ifz\n++ifz;ifz++\nifz"

testing "bc print 1,2,3" \
	"bc" \
	"123" \
	"" "print 1,2,3"

testing "bc { print 1 }" \
	"bc" \
	"1" \
	"" "{ print 1 }"

testing "bc nested loops and breaks" \
	"bc" \
	"\
11
21
31
22
12
99
" \
	"" "\
if(1) {
	11
	while(1) {
		21
		while(1) {
			31
			break
			32
		}
		22
		break
		23
	}
	12
} else {
	88
}
99
"

testing "bc continue in if" \
	"bc" \
	"\
11
21
11
31
99
" \
	"" "\
i=2
while(i--) {
        11
        if(i) {
                21
                continue
                22
        } else {
                31
                continue
                32
	}
        12
}
99
"

testing "bc continue in for" \
	"bc" \
	"\
1
77
2
99
" \
	"" "\
for(i=1; i<3; i++) {
    i
    if(i==2) continue
    77
}
99
"

tar xJf bc_large.tar.xz

for f in bc*.bc; do
	r="`basename "$f" .bc`_results.txt"
	test -f "$r" || continue
	# testing "test name" "command" "expected result" "file input" "stdin"
	testing "bc -lq $f" \
		"{ { bc -lq $f 2>&1; echo E:\$? >&2; } | diff -u - $r; echo E:\$?; } 2>&1" \
		"E:0\nE:0\n" \
		"" ""
done

exit $FAILCOUNT
