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.78 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.77 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.76 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.75 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.74 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.73 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.72 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.71 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.70 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.69 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.68 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh
trackler-2.2.1.67 tracks/bash/exercises/rna-transcription/rna_transcription_test.sh