Skip to content

Commit

Permalink
feat: 1.9.7 Record tests unescaped (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabaut authored Dec 10, 2023
1 parent bb27f83 commit a91e8a6
Show file tree
Hide file tree
Showing 18 changed files with 73 additions and 69 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export SHELL=/bin/bash

VERSION="1.9.6"
ANVIL_C_HEADER_VERSION="1.9.6"
VERSION="1.9.7"
ANVIL_C_HEADER_VERSION="1.9.7"

ECHO_VERSION="./amboso"
RUN_VERSION := $(shell $(ECHO_VERSION) -qv)
Expand Down
6 changes: 3 additions & 3 deletions amboso
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ kernel_release="$(uname -r)"
kernel_version="$(uname -v)"
machine_name="$(uname -m)"
os_name="$(uname -o)"
amboso_currvers="1.9.6"
expected_AMBOSO_API_LVL="1.9.6"
amboso_testflag_version="1.9.6"
amboso_currvers="1.9.7"
expected_AMBOSO_API_LVL="1.9.7"
amboso_testflag_version="1.9.7"
verbose_flag=0
tell_uname_flag=0
quiet_flag=0
Expand Down
4 changes: 2 additions & 2 deletions amboso_fn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

AMBOSO_API_LVL="1.9.6"
AMBOSO_API_LVL="1.9.7"
at () {
printf "{ call: [$(( ${#BASH_LINENO[@]} - 1 ))] "
for ((i=${#BASH_LINENO[@]}-1;i>=0;i--)); do
Expand Down Expand Up @@ -522,7 +522,7 @@ function escape_colorcodes_tee {
#sed -r 's/\/\\3/g' "$file"
#sed -e 's/\\033\[/COLOR[/g' -e 's/COLOR\[1;3/"<colorTag[Heavy,/g' -e 's/COLOR\[0;3/"<colorTag[Light,/g' -e 's/\\e\[0m/\]>"/g' "$file" >>"$outfile"
#sed 's/\x1B\[\([0-9]\{1,2\}\(;[0-9]\{1,2\}\)\?\)\?[mGK]//g' <"$file"
cat -e "$file" | tee "$outfile"
cat "$file" | tee "$outfile"
}

function escape_colorcodes {
Expand Down
1 change: 1 addition & 0 deletions bin/stego.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ errortestsdir = "kulpo"
"1.9.4" = "Fix try_default in main script"
"1.9.5" = "Force quotes on rightvalues for stego file"
"1.9.6" = "-V expects 0-9, allow quoted leftvalues"
"1.9.7" = "Use -v instead of -e for escaping"
3 changes: 3 additions & 0 deletions bin/v1.9.7/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#amboso compliant version folder, will ignore everything inside BUT the gitignore, to keep the clean dir
*
!.gitignore
22 changes: 11 additions & 11 deletions kazoj/bone/anvil_stego.stdout
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ANVIL_AUTOMAKE_VERS: {2.0.0}$
ANVIL_MAKE_VERS: {0.3.0}$
ANVIL_BIN: {hello_world}$
ANVIL_SOURCE: {hello_world.c}$
ANVIL_TESTDIR: {kazoj}$
ANVIL_BONE_DIR: {bone}$
ANVIL_KULPO_DIR: {kulpo}$
ANVIL_GIT_VERSION: {1.0.0}$
ANVIL_GIT_VERSION: {1.1.0}$
ANVIL_BASE_VERSION: {-0.1.0}$
ANVIL_BASE_VERSION: {-0.9.0}$
ANVIL_AUTOMAKE_VERS: {2.0.0}
ANVIL_MAKE_VERS: {0.3.0}
ANVIL_BIN: {hello_world}
ANVIL_SOURCE: {hello_world.c}
ANVIL_TESTDIR: {kazoj}
ANVIL_BONE_DIR: {bone}
ANVIL_KULPO_DIR: {kulpo}
ANVIL_GIT_VERSION: {1.0.0}
ANVIL_GIT_VERSION: {1.1.0}
ANVIL_BASE_VERSION: {-0.1.0}
ANVIL_BASE_VERSION: {-0.9.0}
2 changes: 1 addition & 1 deletion kazoj/bone/good_stego.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
^[[1;36m[LINT]^[[0m { Success on: "./stego-examples/good.stego" }$
[LINT] { Success on: "./stego-examples/good.stego" }
4 changes: 2 additions & 2 deletions kazoj/bone/good_vers.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^[[0;33m[DEBUG] To try building, run with -b flag^[[0m$
$
[DEBUG] To try building, run with -b flag

4 changes: 2 additions & 2 deletions kazoj/bone/good_vers.stdout
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$
^[[1;33m[QUERY] ( 1.0.0 ) binary not found in ( ./binv1.0.0 ).^[[0m$

[QUERY] ( 1.0.0 ) binary not found in ( ./binv1.0.0 ).
2 changes: 1 addition & 1 deletion kazoj/bone/lint_anvil_stego.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
^[[1;36m[LINT]^[[0m { Success on: "./bin/stego.lock" }$
[LINT] { Success on: "./bin/stego.lock" }
2 changes: 1 addition & 1 deletion kazoj/bone/try_amboso_sourcing
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

expected_AMBOSO_API_LVL="1.9.6"
expected_AMBOSO_API_LVL="1.9.7"

verbose_flag=1
tell_uname_flag=0
Expand Down
2 changes: 1 addition & 1 deletion kazoj/bone/try_amboso_sourcing.stderr
Original file line number Diff line number Diff line change
@@ -1 +1 @@
^[[0;32m[PREP] Running with "$AMBOSO_API_LVL" [ ^[[1;35m1.9.6^[[0;32m ]; min is { ^[[1;36m1.9.6^[[0;32m }.^[[0m$
[PREP] Running with "$AMBOSO_API_LVL" [ 1.9.7 ]; min is { 1.9.7 }.
4 changes: 2 additions & 2 deletions kazoj/bone/try_amboso_sourcing.stdout
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[TEST] source_amboso_api()$
[RES] {0}$
[TEST] source_amboso_api()
[RES] {0}
2 changes: 1 addition & 1 deletion kazoj/bone/vershw.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[Success] versions matched!$
[Success] versions matched!
54 changes: 27 additions & 27 deletions kazoj/kulpo/bad_stego.stderr
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m$hey = you ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31mhi/ = err ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m\mine = evl ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m- "# error4"^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31mhey "# error5"^[[0m$
^[[1;31m[LINT]^[[0m Invalid left side (contains spaces or disallowed characters): ^[[1;31mhash#tag^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31munder_score = 1 ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m"1_foo" = ba ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m{} ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31munclosed-curly = {"this" ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31myoink {$} ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m- = farvalue ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m100 = str ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31mval = "myval#" ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m"val" = "myval#" ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m- ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31mtest ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m" = try ^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m[ NO SPACES_ALLOWED ]^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m[ no_missing_square_bracket^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m[-NO-DASHES]^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m[-NOCAPS]^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31mno[way]man^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31mno = "[way] man"^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m[oh[no]]^[[0m$
^[[1;31m[LINT]^[[0m Invalid line: ^[[1;31m[oh]=no^[[0m$
^[[1;31m[LEX]^[[0m Errors while lexing.$
[LINT] Invalid line: $hey = you 
[LINT] Invalid line: hi/ = err 
[LINT] Invalid line: \mine = evl 
[LINT] Invalid line: - "# error4"
[LINT] Invalid line: hey "# error5"
[LINT] Invalid left side (contains spaces or disallowed characters): hash#tag
[LINT] Invalid line: under_score = 1 
[LINT] Invalid line: "1_foo" = ba 
[LINT] Invalid line: {} 
[LINT] Invalid line: unclosed-curly = {"this" 
[LINT] Invalid line: yoink {$} 
[LINT] Invalid line: - = farvalue 
[LINT] Invalid line: 100 = str 
[LINT] Invalid line: val = "myval#" 
[LINT] Invalid line: "val" = "myval#" 
[LINT] Invalid line: - 
[LINT] Invalid line: test 
[LINT] Invalid line: " = try 
[LINT] Invalid line: [ NO SPACES_ALLOWED ]
[LINT] Invalid line: [ no_missing_square_bracket
[LINT] Invalid line: [-NO-DASHES]
[LINT] Invalid line: [-NOCAPS]
[LINT] Invalid line: no[way]man
[LINT] Invalid line: no = "[way] man"
[LINT] Invalid line: [oh[no]]
[LINT] Invalid line: [oh]=no
[LEX] Errors while lexing.
4 changes: 2 additions & 2 deletions kazoj/kulpo/bad_stego.stdout
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^[[1;31m[CHECK]^[[0m Errors occurred during lexing.$
^[[1;31m[LINT]^[[0m { Failure on: "./stego-examples/bad.stego" }$
[CHECK] Errors occurred during lexing.
[LINT] { Failure on: "./stego-examples/bad.stego" }
8 changes: 4 additions & 4 deletions kazoj/kulpo/bad_vers.stdout
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
^[[1;31m[ERROR] ( 69 ) is not a supported tag.^[[0m$
$
^[[1;33m Run with -h for help.^[[0m$
$
[ERROR] ( 69 ) is not a supported tag.

 Run with -h for help.

14 changes: 7 additions & 7 deletions kazoj/kulpo/error_42.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
^[[1;33m[MODE] Running in test mode.^[[0m$
^[[1;33m[DEBUG] No -D flag, using ( ./bin/ ) for target dir. Run with -V <lvl> to see more.^[[0m$
^[[1;33m[DEBUG] bone dir (NO -K passed to this call): ( bone )^[[0m$
^[[1;33m kulpo dir (NO -K passed to this amboso call): ( kulpo )^[[0m$
$
^[[1;31m[PANIC] Running "amboso" using test mode in a program that will be called by test mode is not supported.^[[0m$
$
[MODE] Running in test mode.
[DEBUG] No -D flag, using ( ./bin/ ) for target dir. Run with -V <lvl> to see more.
[DEBUG] bone dir (NO -K passed to this call): ( bone )
 kulpo dir (NO -K passed to this amboso call): ( kulpo )

[PANIC] Running "amboso" using test mode in a program that will be called by test mode is not supported.

0 comments on commit a91e8a6

Please sign in to comment.