@@ -232,8 +232,7 @@ text_in_terminal(Config) when is_list(Config) ->
232232    Node  =  proplists :get_value (node , Config ),
233233    Term  =  proplists :get_value (term , Config ),
234234    ExpectedLineCount  =  10  +  proplists :get_value (lines , Config , 10 ) +  2 ,
235- 
236-     EtopStartCmd  =  " spawn_link(etop, start, [[{node," ++ atom_to_list (Node )++ " },{output,text},{interval,1}]])." 
235+     EtopStartCmd  =  io_lib :format (" spawn_link(etop, start, [[{node,~w },{output,text},{interval,1}]])." Node ]),
237236    shell_test_lib :send_tty (Term , EtopStartCmd ),
238237    shell_test_lib :send_tty (Term , " Enter" 
239238
@@ -321,16 +320,16 @@ text_to_file(Config) when is_list(Config) ->
321320    stop  =  erpc :call (Node , etop , stop , []),
322321
323322    lists :foldl (fun ({_Index , ? ERASE_ALL }, Acc ) ->
324-                         Acc ;
325-                    ({Index , Line }, Acc ) ->
326-                         Lines  =  lists :append (Acc , [Line ]),
327-                         case  Index  rem  ExpectedLineCount  of 
328-                             0  ->
329-                                 verify_etop_output (Config , Lines , cooked ),
330-                                 [];
331-                             _  ->
332-                                 Lines 
333-                         end 
323+                            Acc ;
324+                        ({Index , Line }, Acc ) ->
325+                            Lines  =  lists :append (Acc , [Line ]),
326+                            case  Index  rem  ExpectedLineCount  of 
327+                                0  ->
328+                                    verify_etop_output (Config , Lines , cooked ),
329+                                    [];
330+                                _  ->
331+                                    Lines 
332+                            end 
334333                end , [], lists :enumerate (Content )),
335334    ok .
336335
@@ -406,8 +405,8 @@ verify_dup_line(Char, Line) ->
406405    true  =  string :equal (ExpectedLine , Line ).
407406
408407verify_node_and_time_line (Node , NodeAndTimeLine ) -> 
409-     NodeString  =  atom_to_binary (Node ),
410408    [NodeString  | SplitLine ] =  string :split (string :trim (NodeAndTimeLine ), "  " all ),
409+     Node  =  binary_to_atom (string :trim (NodeString , both , " '" 
411410
412411    TimeLine  =  lists :last (SplitLine ),
413412    [Hour , Minute , Second ] =  string :split (TimeLine , " :" all ),
0 commit comments