-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(functions): adds case for ohmyzsh (#21)
- Loading branch information
1 parent
f92fabe
commit c53af52
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/bin/bash | ||
|
||
install_ohmyzsh() { | ||
# eval command to support evaluating environment variable strings passed from the config | ||
export ZSH="$(eval echo ${ZSH:-})" | ||
# install ohmyzsh | ||
sh -c "$(curl_or_wget -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[common] | ||
|
||
os = "ubuntu-22.04" | ||
image = "phusion/baseimage:jammy-1.0.4" | ||
|
||
setup-tag = "setup" | ||
|
||
[case.default.test] | ||
|
||
assert-install-names = ["apt_get_packages", "ohmyzsh"] | ||
|
||
[[case.default.test.commands]] | ||
|
||
command = "bash" | ||
arguments = [ | ||
"-ceu", | ||
"[[ -d ~/.oh-my-zsh ]] && echo exists || echo missing", | ||
] | ||
assert-stdout-equals = "exists" | ||
|
||
[[case.default.test.commands]] | ||
|
||
command = "bash" | ||
arguments = [ | ||
"-ceu", | ||
"cat ~/.zshrc", | ||
] | ||
assert-stdout-contains = "ZSH_THEME=\"robbyrussell\"" | ||
|
||
[case.custom] | ||
install-tag = "custom" | ||
|
||
[case.custom.test] | ||
|
||
assert-install-names = ["apt_get_packages", "ohmyzsh+custom"] | ||
|
||
[[case.custom.test.commands]] | ||
|
||
command = "zsh" | ||
arguments = [ | ||
"-ceu", | ||
"cd ~/.custom-oh-my-zsh && git config --get remote.origin.url", | ||
] | ||
assert-stdout-contains = "nyoungstudios/ohmyzsh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ apt_get_packages ] | ||
tags = [ "setup" ] | ||
options = [ | ||
"--no-install-recommends", | ||
"git", | ||
"zsh" | ||
] | ||
|
||
[ ohmyzsh ] | ||
options = [] | ||
|
||
[ "ohmyzsh+custom" ] | ||
tags = [ "custom" ] | ||
options = [] | ||
|
||
[ "ohmyzsh+custom".env ] | ||
ZSH = "~/.custom-oh-my-zsh" | ||
REPO = "nyoungstudios/ohmyzsh" |