Skip to content

Commit

Permalink
Add cenity test for --warning
Browse files Browse the repository at this point in the history
  • Loading branch information
greygoo committed Oct 18, 2024
1 parent 18c68f7 commit 8ed8262
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/cenity/tik_warning.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

. ./d_function_test

RESULT=0

asserted_output="\
--WARNING--- AC Power Recommended -------------
Runnning on battery power detected
It is recommended to connect the system to AC power during the install
Press key to continue
[cenity][][] --warning --no-wrap --title=AC Power Recommended --text=Runnning on battery power detected\n\nIt is recommended to connect the system to AC power during the install"
output=$(c_test --warning --no-wrap --title="AC Power Recommended" --text="Runnning on battery power detected\n\nIt is recommended to connect the system to AC power during the install" <<< "\n" 2>&1)
compare "$output" "$asserted_output"


# TODO: handle icons

# c_test --width=600 --warning --icon=security-low-symbolic --text="${postamble}"

# c_test --width=600 --warning --icon=security-medium-symbolic --text="${preamble}\n\nReason: ${reason}\n\n${postamble}"

check_result

0 comments on commit 8ed8262

Please sign in to comment.