Sha256: 1d73d73bdfb94ebd0bc44ad0c59e4a870c88124f55c3d4a479c1e13120f89c79

Contents?: true

Size: 1.28 KB

Versions: 42

Compression:

Stored size: 1.28 KB

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class NukeExportTest < Test::Unit::TestCase
  include ParabolicTracks
  TEST_FILE = File.dirname(__FILE__) + "/samples/ref_NukeScript.nk"
  PREAMBLE = 'version 5.1200
Root {
 inputs 0
 frame 1
 last_frame 1
}
Constant {
 inputs 0
 channels rgb
 format "1080 720 0 0 1080 720 1"
 name CompSize_1080x720
 postage_stamp false
 xpos 0
 ypos -60
}'
  def test_export_output_written
    ensure_same_output Tracksperanto::Export::NukeScript, TEST_FILE
  end
  
  def test_exporter_meta
    assert_equal "nuke.nk", Tracksperanto::Export::NukeScript.desc_and_extension
    assert_equal "Nuke .nk script", Tracksperanto::Export::NukeScript.human_name
  end
  
  def test_tuples_to_curves
    tuples = [[6, 234, 145], [8, 144, 223], [9, 231, 189], [10, 232, 190]]
    x = Tracksperanto::Export::NukeScript.new(StringIO.new)
    curves = x.send(:curves_from_tuples, tuples)
    assert_equal "{curve i x6 234.0000 x8 144.0000 x9 231.0000 232.0000} {curve i x6 145.0000 x8 223.0000 x9 189.0000 190.0000}", curves
  end
  
  def test_compsize_not_overridden
    o = StringIO.new
    x = Tracksperanto::Export::NukeScript.new(o)
    x.start_export(1080, 720)
    x.end_export
    assert_equal PREAMBLE, o.string.strip 
  end
  
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
tracksperanto-3.2.2 test/export/test_nuke_export.rb
tracksperanto-3.2.1 test/export/test_nuke_export.rb
tracksperanto-3.2.0 test/export/test_nuke_export.rb
tracksperanto-3.1.0 test/export/test_nuke_export.rb
tracksperanto-3.0.1 test/export/test_nuke_export.rb
tracksperanto-3.0.0 test/export/test_nuke_export.rb
tracksperanto-2.12.0 test/export/test_nuke_export.rb
tracksperanto-2.11.3 test/export/test_nuke_export.rb
tracksperanto-2.11.2 test/export/test_nuke_export.rb
tracksperanto-2.11.1 test/export/test_nuke_export.rb
tracksperanto-2.11.0 test/export/test_nuke_export.rb
tracksperanto-2.10.0 test/export/test_nuke_export.rb
tracksperanto-2.9.9 test/export/test_nuke_export.rb
tracksperanto-2.9.8 test/export/test_nuke_export.rb
tracksperanto-2.9.7 test/export/test_nuke_export.rb
tracksperanto-2.9.6 test/export/test_nuke_export.rb
tracksperanto-2.9.5 test/export/test_nuke_export.rb
tracksperanto-2.9.4 test/export/test_nuke_export.rb
tracksperanto-2.9.3 test/export/test_nuke_export.rb
tracksperanto-2.9.2 test/export/test_nuke_export.rb