6244d9ca840f494728428897983404861789a81f

Author
hauntsaninja
Committer
hauntsaninja
Date

Message

update tests

Diff

 1diff --git a/tests/test_mkvenv.zunit b/tests/test_mkvenv.zunit
 2index b1bdeaffe23b40787499ea064598b934b5a83cf5..39882d53f4f94945a43c030e5b1e72161ce7bda4 100644
 3--- a/tests/test_mkvenv.zunit
 4+++ b/tests/test_mkvenv.zunit
 5@@ -54,7 +54,7 @@
 6     run cat "$TARGET/myproject/.venv"
 7 
 8     assert $status equals 0
 9-    assert "$output" matches "myproject-[a-zA-Z0-9]{8}"
10+    assert "$output" matches "myproject-[a-z]{4}"
11 }
12 
13 @test 'mkvenv - (poetry project) runs correct command' {
14@@ -100,7 +100,7 @@
15     run cat "$TARGET/myproject/.venv"
16 
17     assert $status equals 0
18-    assert "$output" matches "myproject-[a-zA-Z0-9]{8}"
19+    assert "$output" matches "myproject-[a-z]{4}"
20 }
21 
22 @test 'mkvenv - uses specified python if default set' {
23@@ -123,7 +123,7 @@
24     run cat "$TARGET/myproject/.venv"
25 
26     assert $status equals 0
27-    assert "$output" matches "myproject-[a-zA-Z0-9]{8}"
28+    assert "$output" matches "myproject-[a-z]{4}"
29 }
30 
31 @test 'prints help message and disables plugin if virtualenv not setup' {
32diff --git a/tests/test_plugin.zunit b/tests/test_plugin.zunit
33index 9cf3225506d4c9f74bf290eb466cf131f3656fef..bf08bac4484447552c82b8636ef528b09efd7b95 100644
34--- a/tests/test_plugin.zunit
35+++ b/tests/test_plugin.zunit
36@@ -67,6 +67,8 @@
37     load ../autoswitch_virtualenv.plugin.zsh
38 
39     # check that $(randstr n) returns a string of length n
40-    assert "${#$(randstr)}" equals 8
41+    assert "${#$(randstr)}" equals 4
42     assert "${#$(randstr 19)}" equals 19
43+
44+    assert "$(randstr)" different_to "$(randstr)"
45 }