Sha256: 1ebf7be44d1535884cb873615c67090a421003328d507f43ce034e9692a08411

Contents?: true

Size: 1.16 KB

Versions: 112

Compression:

Stored size: 1.16 KB

Contents

#!/usr/bin/env bats

@test 'Complement of cytosine is guanine' {
  #skip
  run bash rna_transcription.sh C

  [ "$status" -eq 0 ]
  [ "$output" == 'G' ]
}

@test 'Complement of guanine is cytosine' {
  skip
  run bash rna_transcription.sh G
  
  [ "$status" -eq 0 ]
  [ "$output" == 'C' ]
}

@test 'Complement of thymine is adenine' {
  skip
  run bash rna_transcription.sh T

  [ "$status" -eq 0 ]
  [ "$output" == 'A' ]
}

@test 'Complement of adenine is uracil' {
  skip
  run bash rna_transcription.sh A

  [ "$status" -eq 0 ]
  [ "$output" == 'U' ]
}

@test 'Complement of long string' {
  skip
  run bash rna_transcription.sh ACGTGGTCTTAA

  [ "$status" -eq 0 ]
  [ "$output" == 'UGCACCAGAAUU' ]
}

@test 'Handles invalid character' {
  skip
  run bash rna_transcription.sh U

  [ "$status" -eq 1 ]
  [ "$output" == 'Invalid nucleotide detected.' ]
}

@test 'Handles completely invalid string' {
  skip
  run bash rna_transcription.sh XXXX

  [ "$status" -eq 1 ]
  [ "$output" == 'Invalid nucleotide detected.' ]
}

@test 'Handles partially invalid string' {
  skip
  run bash rna_transcription.sh ACGTXCTTAA

  [ "$status" -eq 1 ]
  [ "$output" == 'Invalid nucleotide detected.' ]
}

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.138 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.137 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.136 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.135 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.134 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.133 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.132 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.131 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.130 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.129 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.128 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.127 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.126 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.125 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.124 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.123 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.122 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.121 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.120 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh