github.com/tcnksm/go@v0.0.0-20141208075154-439b32936367/src/hash/test_gen.awk (about)

     1  # Copyright 2009 The Go Authors. All rights reserved.
     2  # Use of this source code is governed by a BSD-style
     3  # license that can be found in the LICENSE file.
     4  
     5  # awk -f test_gen.awk test_cases.txt
     6  # generates test case table.
     7  # edit next line to set particular reference implementation and name.
     8  BEGIN { cmd = "echo -n `9 sha1sum`"; name = "Sha1Test" }
     9  {
    10  	printf("\t%s{ \"", name);
    11  	printf("%s", $0) |cmd;
    12  	close(cmd);
    13  	printf("\", \"%s\" },\n", $0);
    14  }