Files
yunohost/tests/test_helpers.v2.1.d/ynhtest_logging.sh
machine-a-tsoins edb4c397df
Some checks failed
Check for new n releases / updater (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
🍽 Fork YunoHost — snapshot mangé par la machine à tsoins
Upstream: https://github.com/YunoHost/yunohost @ 3a5f8bac8301c450897b96cbd43a4c7d3ba750fb
But (José) : transformer tout le code en bions + ploxions du xerboxion.
La carte de digestion vit au labo : /yunohost-digest.json
2026-07-03 17:20:06 +00:00

55 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# shellcheck disable=SC2016,SC2034,SC2089,SC2090
ynhtest_exec_warn_less() {
FOO='foo'
bar=""
BAR='$bar'
FOOBAR="foo bar"
# These looks like stupid edge case
# but in fact happens when dealing with passwords
# (which could also contain bash chars like [], {}, ...)
# or urls containing &, ...
FOOANDBAR="foo&bar"
FOO1QUOTEBAR="foo'bar"
FOO2QUOTEBAR="foo\"bar"
ynh_hide_warnings uptime
test ! -e $FOO
ynh_hide_warnings touch $FOO
test -e $FOO
rm $FOO
test ! -e $FOO1QUOTEBAR
ynh_hide_warnings touch $FOO1QUOTEBAR
test -e $FOO1QUOTEBAR
rm $FOO1QUOTEBAR
test ! -e $FOO2QUOTEBAR
ynh_hide_warnings touch $FOO2QUOTEBAR
test -e $FOO2QUOTEBAR
rm $FOO2QUOTEBAR
test ! -e $BAR
ynh_hide_warnings touch $BAR
test -e $BAR
rm $BAR
test ! -e "$FOOBAR"
ynh_hide_warnings touch "$FOOBAR"
test -e "$FOOBAR"
rm "$FOOBAR"
test ! -e "$FOOANDBAR"
ynh_hide_warnings touch $FOOANDBAR
test -e "$FOOANDBAR"
rm "$FOOANDBAR"
test ! -e $FOO
! ynh_hide_warnings "touch $FOO"
! test -e $FOO
}