mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
daf47e80b9
commit
5f19315a66
|
@ -14,7 +14,7 @@ func (r *R) Template() string {
|
|||
}
|
||||
|
||||
func (r *R) Init(props properties.Properties, env environment.Environment) {
|
||||
rRegex := `R (scripting front-end )?version (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`
|
||||
rRegex := `version (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`
|
||||
r.language = language{
|
||||
env: env,
|
||||
props: props,
|
||||
|
|
|
@ -19,6 +19,7 @@ func TestR(t *testing.T) {
|
|||
HasRexe bool
|
||||
Version string
|
||||
}{
|
||||
{Case: "Rscript 4.2.0", ExpectedString: "4.2.0", HasRscript: true, Version: "Rscript (R) version 4.2.0 (2022-04-22)"},
|
||||
{Case: "Rscript 4.1.3", ExpectedString: "4.1.3", HasRscript: true, Version: "R scripting front-end version 4.1.3 (2022-03-10)"},
|
||||
{Case: "Rscript 4.1.3 patched", ExpectedString: "4.1.3", HasRscript: true, Version: "R scripting front-end version 4.1.3 Patched (2022-03-10 r81896)"},
|
||||
{Case: "Rscript 4.0.0", ExpectedString: "4.0.0", HasRscript: true, Version: "R scripting front-end version 4.0.0 (2020-04-24)"},
|
||||
|
|
Loading…
Reference in a new issue