blob: 3aefbb831d3bbc0a13c50ac2366c358b081f0a08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
BeforeAll {
. $PSScriptRoot/../lib/lib.ps1
}
Describe "Login Shell" {
BeforeAll {
$distro = Install-Distro
}
It "should start commands in a login shell" {
$distro.Launch("shopt -q login_shell")
$LASTEXITCODE | Should -Be 0
}
It "should be possible to access home manager sessionVariables" {
$distro.InstallConfig("$PSScriptRoot/session-variables.nix")
$distro.Launch("echo \`$TEST_VARIABLE") | Select-Object -Last 1 | Should -BeExactly "THISISATESTSTRING"
$distro.Launch("echo \`$EDITOR") | Select-Object -Last 1 | Should -BeExactly "vim"
}
AfterAll {
$distro.Uninstall()
}
}
|