Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 434)
+++ test/Makefile.am	(revision 442)
@@ -1,6 +1,4 @@
 EXTRA_DIST += \
-	test/CMakeLists.txt \
-        test/min_cost_flow_test.lgf \
-        test/preflow_graph.lgf
+	test/CMakeLists.txt
 
 noinst_HEADERS += \
Index: test/min_cost_flow_test.lgf
===================================================================
--- test/min_cost_flow_test.lgf	(revision 357)
+++ 	(revision )
@@ -1,44 +1,0 @@
-@nodes
-label	supply1	supply2	supply3
-1	0	20	27	
-2	0	-4	0		
-3	0	0	0	
-4	0	0	0	
-5	0	9	0	
-6	0	-6	0	
-7	0	0	0	
-8	0	0	0	
-9	0	3	0	
-10	0	-2	0	
-11	0	0	0		
-12	0	-20	-27	
-               
-@arcs
-		cost	capacity	lower1	lower2
-1	2	70	11		0	8
-1	3	150	3		0	1
-1	4	80	15		0	2
-2	8	80	12		0	0
-3	5	140	5		0	3
-4	6	60	10		0	1
-4	7	80	2		0	0
-4	8	110	3		0	0
-5	7	60	14		0	0
-5	11	120	12		0	0
-6	3	0	3		0	0
-6	9	140	4		0	0
-6	10	90	8		0	0
-7	1	30	5		0	0
-8	12	60	16		0	4
-9	12	50	6		0	0
-10	12	70	13		0	5
-10	2	100	7		0	0
-10	7	60	10		0	0
-11	10	20	14		0	6
-12	11	30	10		0	0
-
-@attributes
-source	1
-target	12
-
-@end
Index: test/preflow_graph.lgf
===================================================================
--- test/preflow_graph.lgf	(revision 409)
+++ 	(revision )
@@ -1,34 +1,0 @@
-@nodes
-label
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-@arcs
-		label	capacity
-0	1	0	20
-0	2	1	0
-1	1	2	3
-1	2	3	8
-1	3	4	8
-2	5	5	5
-3	2	6	5
-3	5	7	5
-3	6	8	5
-4	3	9	3
-5	7	10	3
-5	6	11	10
-5	8	12	10
-6	8	13	8
-8	9	14	20
-8	1	15	5
-9	5	16	5
-@attributes
-source 1
-target 8
Index: test/preflow_test.cc
===================================================================
--- test/preflow_test.cc	(revision 409)
+++ test/preflow_test.cc	(revision 442)
@@ -17,6 +17,5 @@
  */
 
-#include <fstream>
-#include <string>
+#include <iostream>
 
 #include "test_tools.h"
@@ -29,4 +28,40 @@
 
 using namespace lemon;
+
+char test_lgf[] =
+  "@nodes\n"
+  "label\n"
+  "0\n"
+  "1\n"
+  "2\n"
+  "3\n"
+  "4\n"
+  "5\n"
+  "6\n"
+  "7\n"
+  "8\n"
+  "9\n"
+  "@arcs\n"
+  "    label capacity\n"
+  "0 1 0     20\n"
+  "0 2 1     0\n"
+  "1 1 2     3\n"
+  "1 2 3     8\n"
+  "1 3 4     8\n"
+  "2 5 5     5\n"
+  "3 2 6     5\n"
+  "3 5 7     5\n"
+  "3 6 8     5\n"
+  "4 3 9     3\n"
+  "5 7 10    3\n"
+  "5 6 11    10\n"
+  "5 8 12    10\n"
+  "6 8 13    8\n"
+  "8 9 14    20\n"
+  "8 1 15    5\n"
+  "9 5 16    5\n"
+  "@attributes\n"
+  "source 1\n"
+  "target 8\n";
 
 void checkPreflowCompile()
@@ -124,18 +159,9 @@
   typedef Preflow<Digraph, CapMap> PType;
 
-  std::string f_name;
-  if( getenv("srcdir") )
-    f_name = std::string(getenv("srcdir"));
-  else f_name = ".";
-  f_name += "/test/preflow_graph.lgf";
-
-  std::ifstream file(f_name.c_str());
-
-  check(file, "Input file '" << f_name << "' not found.");
-
   Digraph g;
   Node s, t;
   CapMap cap(g);
-  DigraphReader<Digraph>(g,file).
+  std::istringstream input(test_lgf);
+  DigraphReader<Digraph>(g,input).
     arcMap("capacity", cap).
     node("source",s).
Index: test/suurballe_test.cc
===================================================================
--- test/suurballe_test.cc	(revision 358)
+++ test/suurballe_test.cc	(revision 442)
@@ -18,5 +18,4 @@
 
 #include <iostream>
-#include <fstream>
 
 #include <lemon/list_graph.h>
@@ -28,4 +27,47 @@
 
 using namespace lemon;
+
+char test_lgf[] =
+  "@nodes\n"
+  "label supply1 supply2 supply3\n"
+  "1     0        20      27\n"
+  "2     0       -4        0\n"
+  "3     0        0        0\n"
+  "4     0        0        0\n"
+  "5     0        9        0\n"
+  "6     0       -6        0\n"
+  "7     0        0        0\n"
+  "8     0        0        0\n"
+  "9     0        3        0\n"
+  "10    0       -2        0\n"
+  "11    0        0        0\n"
+  "12    0       -20     -27\n"
+  "@arcs\n"
+  "      cost capacity lower1 lower2\n"
+  " 1  2  70  11       0      8\n"
+  " 1  3 150   3       0      1\n"
+  " 1  4  80  15       0      2\n"
+  " 2  8  80  12       0      0\n"
+  " 3  5 140   5       0      3\n"
+  " 4  6  60  10       0      1\n"
+  " 4  7  80   2       0      0\n"
+  " 4  8 110   3       0      0\n"
+  " 5  7  60  14       0      0\n"
+  " 5 11 120  12       0      0\n"
+  " 6  3   0   3       0      0\n"
+  " 6  9 140   4       0      0\n"
+  " 6 10  90   8       0      0\n"
+  " 7  1  30   5       0      0\n"
+  " 8 12  60  16       0      4\n"
+  " 9 12  50   6       0      0\n"
+  "10 12  70  13       0      5\n"
+  "10  2 100   7       0      0\n"
+  "10  7  60  10       0      0\n"
+  "11 10  20  14       0      6\n"
+  "12 11  30  10       0      0\n"
+  "@attributes\n"
+  "source  1\n"
+  "target 12\n"
+  "@end\n";
 
 // Check the feasibility of the flow
@@ -97,12 +139,5 @@
   Node source, target;
 
-  std::string fname;
-  if(getenv("srcdir"))
-    fname = std::string(getenv("srcdir"));
-  else fname = ".";
-  fname += "/test/min_cost_flow_test.lgf";
-
-  std::ifstream input(fname.c_str());
-  check(input, "Input file '" << fname << "' not found");
+  std::istringstream input(test_lgf);
   DigraphReader<ListDigraph>(digraph, input).
     arcMap("cost", length).
@@ -110,5 +145,4 @@
     node("target", target).
     run();
-  input.close();
   
   // Find 2 paths
