@@ -27,6 +27,11 @@ func Test_Parse_Snippets(t *testing.T) {
2727 const rbexp = "def goodbye\n puts \" Goodbye, World!\" \n end"
2828 const jsexp = "function goodbye() {\n console.log('Goodbye, World!');\n }"
2929 const htmlexp = "<p>Goodbye World</p>"
30+ const yamlexp = "address:\n street: 123 Main St\n city: Springfield\n zip: 12345"
31+ const ymlexp = "address:\n street: 123 Main St\n city: Springfield\n zip: 12345"
32+ const shexp = "echo \" Goodbye, World!\" "
33+ const envexp = "GOODBYE=\" goodbye\" "
34+ const envrcexp = "export GOODBYE=\" goodbye\" "
3035
3136 table := []struct {
3237 path string
@@ -39,6 +44,11 @@ func Test_Parse_Snippets(t *testing.T) {
3944 {path : "snippets.rb" , lang : "rb" , start : 7 , end : 11 , exp : rbexp },
4045 {path : "snippets.js" , lang : "js" , start : 7 , end : 11 , exp : jsexp },
4146 {path : "snippets.html" , lang : "html" , start : 16 , end : 18 , exp : htmlexp },
47+ {path : "snippets.yaml" , lang : "yaml" , start : 5 , end : 10 , exp : yamlexp },
48+ {path : "snippets.yml" , lang : "yml" , start : 5 , end : 10 , exp : ymlexp },
49+ {path : "snippets.sh" , lang : "sh" , start : 3 , end : 5 , exp : shexp },
50+ {path : "snippets.env" , lang : "env" , start : 1 , end : 3 , exp : envexp },
51+ {path : ".envrc" , lang : "envrc" , start : 1 , end : 3 , exp : envrcexp },
4252 }
4353
4454 for _ , tc := range table {
0 commit comments