Fix coordinates in hgvs annotations.
[lightning.git] / tilelib_test.go
index 6d6ff5abb8245c8315e110070c7302983ee9e593..5801b9baf3b6c864b09a3882b7d4b2eabd05e68c 100644 (file)
@@ -1,7 +1,12 @@
-package main
+// Copyright (C) The Lightning Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+package lightning
 
 import (
        "bytes"
+       "regexp"
        "strings"
 
        "gopkg.in/check.v1"
@@ -32,6 +37,8 @@ gttattaataataacttatcatca
 }
 
 func (s *tilelibSuite) TestSkipOOO(c *check.C) {
+       matchAllChromosomes := regexp.MustCompile(".")
+
        // tags appear in seq: 4, 0, 2 (but skipOOO is false)
        tilelib := &tileLibrary{taglib: &s.taglib, skipOOO: false}
        tseq, _, err := tilelib.TileFasta("test-label", bytes.NewBufferString(">test-seq\n"+
@@ -40,7 +47,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[0]+
                "cccccccccccccccccccc\n"+
                s.tag[2]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{4, 1}, {0, 1}, {2, 1}}})
 
@@ -52,7 +59,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[1]+
                "ggggggggggggggggggggggg\n"+
                s.tag[2]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {2, 1}}})
 
@@ -64,7 +71,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[3]+
                "ggggggggggggggggggggggg\n"+
                s.tag[4]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{2, 1}, {3, 1}, {4, 1}}})
 
@@ -76,7 +83,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[0]+
                "ggggggggggggggggggggggg\n"+
                s.tag[2]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {2, 1}}})
 
@@ -88,7 +95,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[2]+
                "ggggggggggggggggggggggg\n"+
                s.tag[1]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}}})
 
@@ -102,7 +109,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[1]+
                "ggggggggggggggggggggggg\n"+
                s.tag[2]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {2, 1}}})
 
@@ -118,7 +125,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[0]+
                "ggggggggggggggggggggggg\n"+
                s.tag[4]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {3, 1}, {4, 1}}})
 
@@ -130,7 +137,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) {
                s.tag[1]+
                "ggggggggggggggggggggggg\n"+
                s.tag[3]+
-               "\n"))
+               "\n"), matchAllChromosomes, false)
        c.Assert(err, check.IsNil)
        c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {3, 1}}})
 }