Sha256: 01d327217cc003e99e0081159e7f19fd2ac2af0e96090f5be1cbad652534d181

Contents?: true

Size: 1.29 KB

Versions: 8

Compression:

Stored size: 1.29 KB

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require 'bundler/setup'
require 'vedeu'

class DSLApp

  Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }

  Vedeu.configure do
    height 5
    debug!
    log '/tmp/vedeu_views_dsl.log'
    renderers(Vedeu::Renderers::Terminal.new(
                filename: '/tmp/342_streams.out',
                write_file: true))
    run_once!
    standalone!
  end

  Vedeu.interface :test1_interface do
    background '#000022'
    geometry do
      x  3
      y  3
      xn 53
      yn 3
    end
  end

  Vedeu.render do
    view(:test1_interface) do
      line do
        stream do
          foreground '#cc66ff'
          left '07/01/2016 21:32:19'
        end
        stream do
          foreground '#007777'
          left ' null'
        end
        stream do
          foreground '#dddddd'
          left ' > hi'
        end
      end
    end
  end

  def self.actual
    File.read('/tmp/342_streams.out')
  end

  def self.expected
    File.read(File.expand_path('../expected/342_streams.out', __FILE__))
  end

  def self.start(argv = ARGV)
    Vedeu::Launcher.execute!(argv)
  end

end # DSLApp

DSLApp.start

if DSLApp.expected == DSLApp.actual
  puts "#{__FILE__} \e[32mPassed.\e[39m"
  exit 0;
else
  puts "#{__FILE__} \e[31mFailed.\e[39m"
  exit 1;
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vedeu-0.8.12 integrations/342_streams.rb
vedeu-0.8.10 integrations/342_streams.rb
vedeu-0.8.9 integrations/342_streams.rb
vedeu-0.8.8 integrations/342_streams.rb
vedeu-0.8.7 integrations/342_streams.rb
vedeu-0.8.6 integrations/342_streams.rb
vedeu-0.8.5 integrations/342_streams.rb
vedeu-0.8.4 integrations/342_streams.rb