Sponsored Content
Top Forums Programming how To edit exe to insert a serial no wich can be usd by runing exe Post 42258 by norsk hedensk on Friday 24th of October 2003 04:40:20 PM
Old 10-24-2003
ill also add that even if it is a legitimate reason for you to do this, (im not saying that it is or it isnt...) its not something easily talked through. youd have to learn the concepts and methods of finding this information on your own.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

.exe file

Hello all, how to run windows .exe file in Linux and vice the versa (3 Replies)
Discussion started by: rajashekaran
3 Replies

2. SuSE

does exe

does exe files works withe suse am new n linux system and were can i find msn 4 linux (2 Replies)
Discussion started by: abdulla
2 Replies

3. Linux

How to run .exe

Hai, is there any way to run an .exe file in unix environment . i have read that WINE HQ supports this concept but its very inconsistent and upto the user risk . but i tried WINE but iam not able to configure it can any one help me in this matter Regards Sanju (1 Reply)
Discussion started by: sanjustudy
1 Replies

4. Programming

exe info

Hi Is it possible to find all the information like its 'ProductName', 'ProductVersion, ''InternalName' , 'FileVersion' etc about a windows excutable file,( i.e. *.exe file ) on Unix/Linux. thanks sumsin (6 Replies)
Discussion started by: sumsin
6 Replies

5. UNIX for Dummies Questions & Answers

.exe files

how to open .exe file in freebsd system.My work is to run a growth.exe(created by growth.c turbo c 3.0 file).how to run that exe file in freebsd system?Thanks in advance help me (8 Replies)
Discussion started by: kumarangopi
8 Replies

6. Programming

running exe

how we can run the exe when the system starts. (2 Replies)
Discussion started by: phani_sree
2 Replies

7. Programming

exe

Is it possible to extract c program,from its executable file(.exe)? i mean we dont have program but its exe file only which runs,can we retrieve the program? if yes how? if no why? (2 Replies)
Discussion started by: unknown9
2 Replies

8. Programming

How to build .exe from c

All, I have never comipled C code before and would appricaite if anyone could tell me how to build a .exe from a C program. Thanks in advance. (5 Replies)
Discussion started by: thana
5 Replies

9. Programming

exe

hello everyone, could somebody tell me where can i find some good exercises on signals,processes and threads? actually i need to find some solved exercises in system programming. tnx (4 Replies)
Discussion started by: micy
4 Replies

10. UNIX for Beginners Questions & Answers

Seen Windows pc, having all the features of Linux, could exe, read and edit save like windows

Hi, totally new to linux base using windows when started learning and using computers. but i remember that one pc was there , look alike windows desktop, but could not do the task as windows just click and open and view edit etc. But, you could do a little differently even saving in and opening... (8 Replies)
Discussion started by: jraju
8 Replies
Test::Builder(3pm)					 Perl Programmers Reference Guide					Test::Builder(3pm)

NAME
Test::Builder - Backend for building test libraries SYNOPSIS
package My::Test::Module; use Test::Builder; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(ok); my $Test = Test::Builder->new; $Test->output('my_logfile'); sub import { my($self) = shift; my $pack = caller; $Test->exported_to($pack); $Test->plan(@_); $self->export_to_level(1, $self, 'ok'); } sub ok { my($test, $name) = @_; $Test->ok($test, $name); } DESCRIPTION
Test::Simple and Test::More have proven to be popular testing modules, but they're not always flexible enough. Test::Builder provides the a building block upon which to write your own test libraries which can work together. Construction new my $Test = Test::Builder->new; Returns a Test::Builder object representing the current state of the test. Since you only run one test per program, there is one and only one Test::Builder object. No matter how many times you call new(), you're getting the same object. (This is called a singleton). Setting up tests These methods are for setting up tests and declaring how many there are. You usually only want to call one of these methods. exported_to my $pack = $Test->exported_to; $Test->exported_to($pack); Tells Test::Builder what package you exported your functions to. This is important for getting TODO tests right. plan $Test->plan('no_plan'); $Test->plan( skip_all => $reason ); $Test->plan( tests => $num_tests ); A convenient way to set up your tests. Call this and Test::Builder will print the appropriate headers and take the appropriate actions. If you call plan(), don't call any of the other methods below. expected_tests my $max = $Test->expected_tests; $Test->expected_tests($max); Gets/sets the # of tests we expect this test to run and prints out the appropriate headers. no_plan $Test->no_plan; Declares that this test will run an indeterminate # of tests. has_plan $plan = $Test->has_plan Find out whether a plan has been defined. $plan is either "undef" (no plan has been set), "no_plan" (indeterminate # of tests) or an integer (the number of expected tests). skip_all $Test->skip_all; $Test->skip_all($reason); Skips all the tests, using the given $reason. Exits immediately with 0. Running tests These actually run the tests, analogous to the functions in Test::More. $name is always optional. ok $Test->ok($test, $name); Your basic test. Pass if $test is true, fail if $test is false. Just like Test::Simple's ok(). is_eq $Test->is_eq($got, $expected, $name); Like Test::More's is(). Checks if $got eq $expected. This is the string version. is_num $Test->is_num($got, $expected, $name); Like Test::More's is(). Checks if $got == $expected. This is the numeric version. isnt_eq $Test->isnt_eq($got, $dont_expect, $name); Like Test::More's isnt(). Checks if $got ne $dont_expect. This is the string version. isnt_num $Test->is_num($got, $dont_expect, $name); Like Test::More's isnt(). Checks if $got ne $dont_expect. This is the numeric version. like $Test->like($this, qr/$regex/, $name); $Test->like($this, '/$regex/', $name); Like Test::More's like(). Checks if $this matches the given $regex. You'll want to avoid qr// if you want your tests to work before 5.005. unlike $Test->unlike($this, qr/$regex/, $name); $Test->unlike($this, '/$regex/', $name); Like Test::More's unlike(). Checks if $this does not match the given $regex. maybe_regex $Test->maybe_regex(qr/$regex/); $Test->maybe_regex('/$regex/'); Convenience method for building testing functions that take regular expressions as arguments, but need to work before perl 5.005. Takes a quoted regular expression produced by qr//, or a string representing a regular expression. Returns a Perl value which may be used instead of the corresponding regular expression, or undef if it's argument is not recognised. For example, a version of like(), sans the useful diagnostic messages, could be written as: sub laconic_like { my ($self, $this, $regex, $name) = @_; my $usable_regex = $self->maybe_regex($regex); die "expecting regex, found '$regex' " unless $usable_regex; $self->ok($this =~ m/$usable_regex/, $name); } cmp_ok $Test->cmp_ok($this, $type, $that, $name); Works just like Test::More's cmp_ok(). $Test->cmp_ok($big_num, '!=', $other_big_num); BAILOUT $Test->BAILOUT($reason); Indicates to the Test::Harness that things are going so badly all testing should terminate. This includes running any additional test scripts. It will exit with 255. skip $Test->skip; $Test->skip($why); Skips the current test, reporting $why. todo_skip $Test->todo_skip; $Test->todo_skip($why); Like skip(), only it will declare the test as failing and TODO. Similar to print "not ok $tnum # TODO $why "; Test style level $Test->level($how_high); How far up the call stack should $Test look when reporting where the test failed. Defaults to 1. Setting $Test::Builder::Level overrides. This is typically useful localized: { local $Test::Builder::Level = 2; $Test->ok($test); } use_numbers $Test->use_numbers($on_or_off); Whether or not the test should output numbers. That is, this if true: ok 1 ok 2 ok 3 or this if false ok ok ok Most useful when you can't depend on the test output order, such as when threads or forking is involved. Test::Harness will accept either, but avoid mixing the two styles. Defaults to on. no_header $Test->no_header($no_header); If set to true, no "1..N" header will be printed. no_ending $Test->no_ending($no_ending); Normally, Test::Builder does some extra diagnostics when the test ends. It also changes the exit code as described in Test::Simple. If this is true, none of that will be done. Output Controlling where the test output goes. It's ok for your test to change where STDOUT and STDERR point to, Test::Builder's default output settings will not be affected. diag $Test->diag(@msgs); Prints out the given $message. Normally, it uses the failure_output() handle, but if this is for a TODO test, the todo_output() handle is used. Output will be indented and marked with a # so as not to interfere with test output. A newline will be put on the end if there isn't one already. We encourage using this rather than calling print directly. Returns false. Why? Because diag() is often used in conjunction with a failing test ("ok() || diag()") it "passes through" the fail- ure. return ok(...) || diag(...); output $Test->output($fh); $Test->output($file); Where normal "ok/not ok" test output should go. Defaults to STDOUT. failure_output $Test->failure_output($fh); $Test->failure_output($file); Where diagnostic output on test failures and diag() should go. Defaults to STDERR. todo_output $Test->todo_output($fh); $Test->todo_output($file); Where diagnostics about todo test failures and diag() should go. Defaults to STDOUT. Test Status and Info current_test my $curr_test = $Test->current_test; $Test->current_test($num); Gets/sets the current test # we're on. You usually shouldn't have to set this. summary my @tests = $Test->summary; A simple summary of the tests so far. True for pass, false for fail. This is a logical pass/fail, so todos are passes. Of course, test #1 is $tests[0], etc... details my @tests = $Test->details; Like summary(), but with a lot more detail. $tests[$test_num - 1] = { 'ok' => is the test considered a pass? actual_ok => did it literally say 'ok'? name => name of the test (if any) type => type of test (if any, see below). reason => reason for the above (if any) }; 'ok' is true if Test::Harness will consider the test to be a pass. 'actual_ok' is a reflection of whether or not the test literally printed 'ok' or 'not ok'. This is for examining the result of 'todo' tests. 'name' is the name of the test. 'type' indicates if it was a special test. Normal tests have a type of ''. Type can be one of the following: skip see skip() todo see todo() todo_skip see todo_skip() unknown see below Sometimes the Test::Builder test counter is incremented without it printing any test output, for example, when current_test() is changed. In these cases, Test::Builder doesn't know the result of the test, so it's type is 'unkown'. These details for these tests are filled in. They are considered ok, but the name and actual_ok is left undef. For example "not ok 23 - hole count # TODO insufficient donuts" would result in this structure: $tests[22] = # 23 - 1, since arrays start from 0. { ok => 1, # logically, the test passed since it's todo actual_ok => 0, # in absolute terms, it failed name => 'hole count', type => 'todo', reason => 'insufficient donuts' }; todo my $todo_reason = $Test->todo; my $todo_reason = $Test->todo($pack); todo() looks for a $TODO variable in your tests. If set, all tests will be considered 'todo' (see Test::More and Test::Harness for details). Returns the reason (ie. the value of $TODO) if running as todo tests, false otherwise. todo() is pretty part about finding the right package to look for $TODO in. It uses the exported_to() package to find it. If that's not set, it's pretty good at guessing the right package to look at. Sometimes there is some confusion about where todo() should be looking for the $TODO variable. If you want to be sure, tell it explic- itly what $pack to use. caller my $package = $Test->caller; my($pack, $file, $line) = $Test->caller; my($pack, $file, $line) = $Test->caller($height); Like the normal caller(), except it reports according to your level(). THREADS
In perl 5.8.0 and later, Test::Builder is thread-safe. The test number is shared amongst all threads. This means if one thread sets the test number using current_test() they will all be effected. EXAMPLES
CPAN can provide the best examples. Test::Simple, Test::More, Test::Exception and Test::Differences all use Test::Builder. SEE ALSO
Test::Simple, Test::More, Test::Harness AUTHORS
Original code by chromatic, maintained by Michael G Schwern <schwern@pobox.com> COPYRIGHT
Copyright 2002 by chromatic <chromatic@wgz.org>, Michael G Schwern <schwern@pobox.com>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.8.0 2002-06-01 Test::Builder(3pm)
All times are GMT -4. The time now is 03:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy