1st test
This commit is contained in:
parent
b76111f017
commit
a5ea0292f2
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
i_am() {
|
||||
echo 'v0.4'
|
||||
}
|
||||
|
||||
i_am_root() {
|
||||
[ $(id -u) -eq 0 ]
|
||||
}
|
||||
|
||||
i_should_install() {
|
||||
[[ ! -f ~/.zen/secret.june ]]
|
||||
}
|
|
@ -1,13 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -x
|
||||
. ./include.sh
|
||||
########################################################################
|
||||
# Version: 0.3
|
||||
# Version: 0.4
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
{
|
||||
[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
||||
i_am_root && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
||||
|
||||
# MAIN #
|
||||
if [[ ! -f ~/.zen/secret.june ]];
|
||||
if i_should_install;
|
||||
then
|
||||
|
||||
# Check requirements
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
#shellcheck shell=sh
|
||||
|
||||
Describe "AstrXbian"
|
||||
Describe "install()"
|
||||
install() {
|
||||
echo #
|
||||
}
|
||||
|
||||
It "installs world, but not implemented"
|
||||
Pending "You should implement install function"
|
||||
When call install world
|
||||
The output should eq "amen"
|
||||
Describe 'AstrXbian'
|
||||
Describe 'install()'
|
||||
Include ./include.sh
|
||||
It 'should be me'
|
||||
When call i_am
|
||||
The output should eq 'v0.4'
|
||||
End
|
||||
It 'should not be superuser'
|
||||
When call i_am_root
|
||||
The status should not be success
|
||||
End
|
||||
It 'should install AstrXbian'
|
||||
When call i_should_install
|
||||
The status should be success
|
||||
End
|
||||
End
|
||||
End
|
||||
|
|
Loading…
Reference in New Issue