Project

General

Profile

Feature #5726

Process::EXIT_SUCCESS and Process::EXIT_FAILURE

Added by akr (Akira Tanaka) over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:41541]

Description

I'd like to define Process::EXIT_SUCCESS and Process::EXIT_FAILURE.

I want to use them to test my command line application.
The test calls the main routine of the application and
traps SystemExit.
I'd like to compare status of the exception and EXIT_SUCCESS/EXIT_FAILURE
but Ruby doesn't have constants for them.

Note that the test doesn't spawn a process.
So, there is no Process::Status object and Process::Status#success? is not usable.


Files

History

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Feedback

=begin
Why don't you use (({SystemExit#success?})) ?
=end

Updated by akr (Akira Tanaka) over 7 years ago

2011/12/8 Nobuyoshi Nakada nobu@ruby-lang.org:

Why don't you use (({SystemExit#success?})) ?

Oops. I missed that. Thanks.
--
Tanaka Akira

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF