From 7808b84d3188047f0337ab0e967e96eb0028dab6 Mon Sep 17 00:00:00 2001 From: RuixiangJiang <2037358823@qq.com> Date: Sat, 28 Oct 2023 21:39:12 +0800 Subject: [PATCH] upd make & test --- phase1/Makefile | 7 +++++++ phase1/extratest/test1.out | 2 +- phase1/extratest/test2.out | 2 +- phase1/extratest/test3.out | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/phase1/Makefile b/phase1/Makefile index 3433aab..7579fea 100644 --- a/phase1/Makefile +++ b/phase1/Makefile @@ -17,6 +17,13 @@ lexer: syntax.tab.* lex.yy.c # For debugging lex.l .PHONY: test clean test: splc + @bin/splc extratest/test1.spl > extratest/test1.myout + diff extratest/test1.out extratest/test1.myout + @bin/splc extratest/test2.spl > extratest/test2.myout + diff extratest/test2.out extratest/test2.myout + @bin/splc extratest/test3.spl > extratest/test3.myout + diff extratest/test3.out extratest/test3.myout + @bin/splc test-base/test_1_r01.spl > test-base/test_1_r01.myout diff test-base/test_1_r01.myout test-base/test_1_r01.out @bin/splc test-base/test_1_r02.spl > test-base/test_1_r02.myout diff --git a/phase1/extratest/test1.out b/phase1/extratest/test1.out index 93b39d0..c4b1609 100644 --- a/phase1/extratest/test1.out +++ b/phase1/extratest/test1.out @@ -117,4 +117,4 @@ Program (1) Exp (12) ID: a SEMI - RC \ No newline at end of file + RC diff --git a/phase1/extratest/test2.out b/phase1/extratest/test2.out index 4286d27..8da3be3 100644 --- a/phase1/extratest/test2.out +++ b/phase1/extratest/test2.out @@ -95,4 +95,4 @@ Program (1) Exp (11) FLOAT: 2.3 SEMI - RC \ No newline at end of file + RC diff --git a/phase1/extratest/test3.out b/phase1/extratest/test3.out index f990a62..c9c9756 100644 --- a/phase1/extratest/test3.out +++ b/phase1/extratest/test3.out @@ -2,4 +2,4 @@ Error type A at Line 6: unknown lexeme 'breaking my own rules' Error type A at Line 9: unknown lexeme 5the Error type A at Line 10: unknown lexeme '\n' Error type B at Line 12: syntax error, probably Missing SEMI -Error type B at Line 15: syntax error, probably missing RP \ No newline at end of file +Error type B at Line 15: syntax error, probably missing RP