Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b45ecc commit 92c7076Copy full SHA for 92c7076
1 file changed
tests/languages/rust_test.py
@@ -68,3 +68,23 @@ def mocked_find_executable(exe: str) -> str | None:
68
69
with rust.in_env(prefix, language_version):
70
assert cmd_output('hello_world')[1] == 'Hello, world!\n'
71
+
72
73
+def test_installs_with_existing_rustup(tmpdir):
74
+ tmpdir.join('src', 'main.rs').ensure().write(
75
+ 'fn main() {\n'
76
+ ' println!("Hello, world!");\n'
77
+ '}\n',
78
+ )
79
+ tmpdir.join('Cargo.toml').ensure().write(
80
+ '[package]\n'
81
+ 'name = "hello_world"\n'
82
+ 'version = "0.1.0"\n'
83
+ 'edition = "2021"\n',
84
85
+ prefix = Prefix(str(tmpdir))
86
87
+ assert parse_shebang.find_executable('rustup') is not None
88
+ rust.install_environment(prefix, '1.56.0', ())
89
+ with rust.in_env(prefix, '1.56.0'):
90
+ assert cmd_output('hello_world')[1] == 'Hello, world!\n'
0 commit comments