Compare commits

..

No commits in common. "93271da824951a6f4969ef2828d83030102ac36d" and "10d19c1a36d93d0df91f8587b757780a01aed5ec" have entirely different histories.

2 changed files with 2 additions and 26 deletions

View file

@ -319,13 +319,11 @@ data_yeet() {
_sed_sanitize() {
_trim_control "$1"
# first, replace backslashes with even more backslashes (workaround for sed bug)
# then, do the actual sanitization, take whole expr as a hexstring and pass it on.
echo -n "$tr" | sed 's/\\/\\\\/g' | xxd -p | tr -d '\n' | sed 's/../\\x&/g'
echo -n "$tr" | xxd -p | tr -d '\n' | sed 's/../\\x&/g'
}
_sed_sanitize_array() {
echo -n "$1" | sed 's/\\/\\\\/g' | xxd -p | tr -d '\n' | sed 's/../\\x&/g'
echo -n "$1" | xxd -p | tr -d '\n' | sed 's/../\\x&/g'
}
# _trim_control(string) -> $tr

View file

@ -88,27 +88,6 @@ notORM_replace_oldsyntax() {
}
}
notORM_backslashes() {
tst() {
a=('\0meow')
data_add "$store" a
a=('awawa')
data_add "$store" a
# checks whether data didn't get mangled and can be retrieved
data_get "$store" { '\0meow' } || return $?
# tries to delete the entry, then checks if it got matched
data_yeet "$store" { '\0meow' }
data_get "$store" { '\0meow' }
if [[ $? == 0 ]]; then
return 1
fi
return 0
}
}
subtest_list=(
notORM_add_get
notORM_get_multiline
@ -118,5 +97,4 @@ subtest_list=(
notORM_yeet
notORM_yeet_multiple_filters
notORM_replace_oldsyntax
notORM_backslashes
)