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.180 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.179 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.178 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.177 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.176 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.175 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.174 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.173 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.172 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.171 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.170 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.169 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.167 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.166 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.165 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.164 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.163 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.162 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.161 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.160 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh