@@ -140,6 +140,19 @@ describe('Version from file test', () => {
140140 expect ( _fn ( pythonVersionFilePath ) ) . toEqual ( [ pythonVersion ] ) ;
141141 }
142142 ) ;
143+ it . each ( [ getVersionInputFromTomlFile , getVersionInputFromFile ] ) (
144+ 'Version from mise .mise.toml array test' ,
145+ async _fn => {
146+ await io . mkdirP ( tempDir ) ;
147+ const pythonVersionFileName = '.mise.toml' ;
148+ const pythonVersionFilePath = path . join ( tempDir , pythonVersionFileName ) ;
149+ const pythonVersion = '3.7.0' ;
150+ const otherPythonVersion = '3.6.0' ;
151+ const pythonVersionFileContent = `[tools]\npython = ["${ pythonVersion } ", "${ otherPythonVersion } "]` ;
152+ fs . writeFileSync ( pythonVersionFilePath , pythonVersionFileContent ) ;
153+ expect ( _fn ( pythonVersionFilePath ) ) . toEqual ( [ pythonVersion ] ) ;
154+ }
155+ ) ;
143156 it . each ( [ getVersionInputFromTomlFile , getVersionInputFromFile ] ) (
144157 'Version from mise verbose .mise.toml test' ,
145158 async _fn => {
@@ -152,6 +165,19 @@ describe('Version from file test', () => {
152165 expect ( _fn ( pythonVersionFilePath ) ) . toEqual ( [ pythonVersion ] ) ;
153166 }
154167 ) ;
168+ it . each ( [ getVersionInputFromTomlFile , getVersionInputFromFile ] ) (
169+ 'Version from mise verbose .mise.toml array test' ,
170+ async _fn => {
171+ await io . mkdirP ( tempDir ) ;
172+ const pythonVersionFileName = '.mise.toml' ;
173+ const pythonVersionFilePath = path . join ( tempDir , pythonVersionFileName ) ;
174+ const pythonVersion = '3.7.0' ;
175+ const otherPythonVersion = '3.6.0' ;
176+ const pythonVersionFileContent = `[tools]\npython = [{ version="${ pythonVersion } ", virtualenv=".venv" }, { version="${ otherPythonVersion } ", virtualenv=".venv2" }]` ;
177+ fs . writeFileSync ( pythonVersionFilePath , pythonVersionFileContent ) ;
178+ expect ( _fn ( pythonVersionFilePath ) ) . toEqual ( [ pythonVersion ] ) ;
179+ }
180+ ) ;
155181 it . each ( [ getVersionInputFromTomlFile , getVersionInputFromFile ] ) (
156182 'Version undefined' ,
157183 async _fn => {
0 commit comments