@@ -755,17 +755,21 @@ defmodule CodeFragmentTest do
755755 end: { 1 , 11 }
756756 }
757757
758- assert CF . surround_context ( "__MODULE__.Foo" , { 1 , 12 } ) == % {
759- context: { :alias , { :local_or_var , ~c" __MODULE__" } , ~c" Foo" } ,
760- begin: { 1 , 1 } ,
761- end: { 1 , 15 }
762- }
758+ for i <- 1 .. 15 do
759+ assert CF . surround_context ( "__MODULE__.Foo" , { 1 , i } ) == % {
760+ context: { :alias , { :local_or_var , ~c" __MODULE__" } , ~c" Foo" } ,
761+ begin: { 1 , 1 } ,
762+ end: { 1 , 15 }
763+ }
764+ end
763765
764- assert CF . surround_context ( "__MODULE__.Foo.Sub" , { 1 , 16 } ) == % {
765- context: { :alias , { :local_or_var , ~c" __MODULE__" } , ~c" Foo.Sub" } ,
766- begin: { 1 , 1 } ,
767- end: { 1 , 19 }
768- }
766+ for i <- 1 .. 19 do
767+ assert CF . surround_context ( "__MODULE__.Foo.Sub" , { 1 , i } ) == % {
768+ context: { :alias , { :local_or_var , ~c" __MODULE__" } , ~c" Foo.Sub" } ,
769+ begin: { 1 , 1 } ,
770+ end: { 1 , 19 }
771+ }
772+ end
769773
770774 assert CF . surround_context ( "%__MODULE__{}" , { 1 , 5 } ) == % {
771775 context: { :struct , { :local_or_var , ~c" __MODULE__" } } ,
@@ -811,17 +815,21 @@ defmodule CodeFragmentTest do
811815 end
812816
813817 test "attribute submodules" do
814- assert CF . surround_context ( "@some.Foo" , { 1 , 8 } ) == % {
815- context: { :alias , { :module_attribute , ~c" some" } , ~c" Foo" } ,
816- begin: { 1 , 1 } ,
817- end: { 1 , 10 }
818- }
818+ for i <- 1 .. 10 do
819+ assert CF . surround_context ( "@some.Foo" , { 1 , i } ) == % {
820+ context: { :alias , { :module_attribute , ~c" some" } , ~c" Foo" } ,
821+ begin: { 1 , 1 } ,
822+ end: { 1 , 10 }
823+ }
824+ end
819825
820- assert CF . surround_context ( "@some.Foo.Sub" , { 1 , 12 } ) == % {
821- context: { :alias , { :module_attribute , ~c" some" } , ~c" Foo.Sub" } ,
822- begin: { 1 , 1 } ,
823- end: { 1 , 14 }
824- }
826+ for i <- 1 .. 14 do
827+ assert CF . surround_context ( "@some.Foo.Sub" , { 1 , i } ) == % {
828+ context: { :alias , { :module_attribute , ~c" some" } , ~c" Foo.Sub" } ,
829+ begin: { 1 , 1 } ,
830+ end: { 1 , 14 }
831+ }
832+ end
825833
826834 assert CF . surround_context ( "%@some{}" , { 1 , 5 } ) == % {
827835 context: { :struct , { :module_attribute , ~c" some" } } ,
0 commit comments